diff --git a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/ManagementLockOwner.java b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/ManagementLockOwner.java index ed84bf1ec5c..31cef95c886 100644 --- a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/ManagementLockOwner.java +++ b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/ManagementLockOwner.java @@ -21,7 +21,7 @@ public class ManagementLockOwner { private String applicationId; /** - * Get the applicationId value. + * Get the application ID of the lock owner. * * @return the applicationId value */ @@ -30,7 +30,7 @@ public String applicationId() { } /** - * Set the applicationId value. + * Set the application ID of the lock owner. * * @param applicationId the applicationId value to set * @return the ManagementLockOwner object itself. diff --git a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLockObjectInner.java b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLockObjectInner.java index 274b83c2d0e..5d93e1ec3c9 100644 --- a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLockObjectInner.java +++ b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLockObjectInner.java @@ -60,7 +60,7 @@ public class ManagementLockObjectInner { private String name; /** - * Get the level value. + * Get the level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. Possible values include: 'NotSpecified', 'CanNotDelete', 'ReadOnly'. * * @return the level value */ @@ -69,7 +69,7 @@ public LockLevel level() { } /** - * Set the level value. + * Set the level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. Possible values include: 'NotSpecified', 'CanNotDelete', 'ReadOnly'. * * @param level the level value to set * @return the ManagementLockObjectInner object itself. @@ -80,7 +80,7 @@ public ManagementLockObjectInner withLevel(LockLevel level) { } /** - * Get the notes value. + * Get notes about the lock. Maximum of 512 characters. * * @return the notes value */ @@ -89,7 +89,7 @@ public String notes() { } /** - * Set the notes value. + * Set notes about the lock. Maximum of 512 characters. * * @param notes the notes value to set * @return the ManagementLockObjectInner object itself. @@ -100,7 +100,7 @@ public ManagementLockObjectInner withNotes(String notes) { } /** - * Get the owners value. + * Get the owners of the lock. * * @return the owners value */ @@ -109,7 +109,7 @@ public List owners() { } /** - * Set the owners value. + * Set the owners of the lock. * * @param owners the owners value to set * @return the ManagementLockObjectInner object itself. @@ -120,7 +120,7 @@ public ManagementLockObjectInner withOwners(List owners) { } /** - * Get the id value. + * Get the resource ID of the lock. * * @return the id value */ @@ -129,7 +129,7 @@ public String id() { } /** - * Get the type value. + * Get the resource type of the lock - Microsoft.Authorization/locks. * * @return the type value */ @@ -138,7 +138,7 @@ public String type() { } /** - * Get the name value. + * Get the name of the lock. * * @return the name value */ @@ -147,7 +147,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the lock. * * @param name the name value to set * @return the ManagementLockObjectInner object itself. diff --git a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLocksInner.java b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLocksInner.java index f0ed474220e..7ebc8562430 100644 --- a/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLocksInner.java +++ b/azure-mgmt-locks/src/main/java/com/microsoft/azure/management/locks/implementation/ManagementLocksInner.java @@ -320,8 +320,8 @@ public Observable> call(Response response) { private ServiceResponse deleteAtResourceGroupLevelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -581,8 +581,8 @@ public Observable> call(Response response) { private ServiceResponse deleteByScopeDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -909,8 +909,8 @@ public Observable> call(Response response) { private ServiceResponse deleteAtResourceLevelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1115,8 +1115,8 @@ public Observable> call(Response createOrUpdateAtSubscriptionLevelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1198,8 +1198,8 @@ public Observable> call(Response response) { private ServiceResponse deleteAtSubscriptionLevelDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasPathType.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasPathType.java index bbc31ea7e00..8546898c4cb 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasPathType.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasPathType.java @@ -28,7 +28,7 @@ public class AliasPathType { private List apiVersions; /** - * Get the path value. + * Get the path of an alias. * * @return the path value */ @@ -37,7 +37,7 @@ public String path() { } /** - * Set the path value. + * Set the path of an alias. * * @param path the path value to set * @return the AliasPathType object itself. @@ -48,7 +48,7 @@ public AliasPathType withPath(String path) { } /** - * Get the apiVersions value. + * Get the API versions. * * @return the apiVersions value */ @@ -57,7 +57,7 @@ public List apiVersions() { } /** - * Set the apiVersions value. + * Set the API versions. * * @param apiVersions the apiVersions value to set * @return the AliasPathType object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasType.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasType.java index 077f94794b4..4648744f571 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasType.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/AliasType.java @@ -28,7 +28,7 @@ public class AliasType { private List paths; /** - * Get the name value. + * Get the alias name. * * @return the name value */ @@ -37,7 +37,7 @@ public String name() { } /** - * Set the name value. + * Set the alias name. * * @param name the name value to set * @return the AliasType object itself. @@ -48,7 +48,7 @@ public AliasType withName(String name) { } /** - * Get the paths value. + * Get the paths for an alias. * * @return the paths value */ @@ -57,7 +57,7 @@ public List paths() { } /** - * Set the paths value. + * Set the paths for an alias. * * @param paths the paths value to set * @return the AliasType object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/BasicDependency.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/BasicDependency.java index a3d14bc3fc5..66bce499bcd 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/BasicDependency.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/BasicDependency.java @@ -33,7 +33,7 @@ public class BasicDependency { private String resourceName; /** - * Get the id value. + * Get the ID of the dependency. * * @return the id value */ @@ -42,7 +42,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of the dependency. * * @param id the id value to set * @return the BasicDependency object itself. @@ -53,7 +53,7 @@ public BasicDependency withId(String id) { } /** - * Get the resourceType value. + * Get the dependency resource type. * * @return the resourceType value */ @@ -62,7 +62,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set the dependency resource type. * * @param resourceType the resourceType value to set * @return the BasicDependency object itself. @@ -73,7 +73,7 @@ public BasicDependency withResourceType(String resourceType) { } /** - * Get the resourceName value. + * Get the dependency resource name. * * @return the resourceName value */ @@ -82,7 +82,7 @@ public String resourceName() { } /** - * Set the resourceName value. + * Set the dependency resource name. * * @param resourceName the resourceName value to set * @return the BasicDependency object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DebugSetting.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DebugSetting.java index 9568ec8b13c..33d545df106 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DebugSetting.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DebugSetting.java @@ -27,7 +27,7 @@ public class DebugSetting { private String detailLevel; /** - * Get the detailLevel value. + * Get specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations. * * @return the detailLevel value */ @@ -36,7 +36,7 @@ public String detailLevel() { } /** - * Set the detailLevel value. + * Set specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information you are passing in during deployment. By logging information about the request or response, you could potentially expose sensitive data that is retrieved through the deployment operations. * * @param detailLevel the detailLevel value to set * @return the DebugSetting object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Dependency.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Dependency.java index 8d81c417cb6..a3927dc9413 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Dependency.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Dependency.java @@ -40,7 +40,7 @@ public class Dependency { private String resourceName; /** - * Get the dependsOn value. + * Get the list of dependencies. * * @return the dependsOn value */ @@ -49,7 +49,7 @@ public List dependsOn() { } /** - * Set the dependsOn value. + * Set the list of dependencies. * * @param dependsOn the dependsOn value to set * @return the Dependency object itself. @@ -60,7 +60,7 @@ public Dependency withDependsOn(List dependsOn) { } /** - * Get the id value. + * Get the ID of the dependency. * * @return the id value */ @@ -69,7 +69,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of the dependency. * * @param id the id value to set * @return the Dependency object itself. @@ -80,7 +80,7 @@ public Dependency withId(String id) { } /** - * Get the resourceType value. + * Get the dependency resource type. * * @return the resourceType value */ @@ -89,7 +89,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set the dependency resource type. * * @param resourceType the resourceType value to set * @return the Dependency object itself. @@ -100,7 +100,7 @@ public Dependency withResourceType(String resourceType) { } /** - * Get the resourceName value. + * Get the dependency resource name. * * @return the resourceName value */ @@ -109,7 +109,7 @@ public String resourceName() { } /** - * Set the resourceName value. + * Set the dependency resource name. * * @param resourceName the resourceName value to set * @return the Dependency object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExtendedFilter.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExtendedFilter.java index eed3b9db5fb..691dfeb547b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExtendedFilter.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExtendedFilter.java @@ -21,7 +21,7 @@ public class DeploymentExtendedFilter { private String provisioningState; /** - * Get the provisioningState value. + * Get the provisioning state. * * @return the provisioningState value */ @@ -30,7 +30,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set the provisioning state. * * @param provisioningState the provisioningState value to set * @return the DeploymentExtendedFilter object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperationProperties.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperationProperties.java index 543134b5bc4..dffd56e21ad 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperationProperties.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperationProperties.java @@ -64,7 +64,7 @@ public class DeploymentOperationProperties { private HttpMessage response; /** - * Get the provisioningState value. + * Get the state of the provisioning. * * @return the provisioningState value */ @@ -73,7 +73,7 @@ public String provisioningState() { } /** - * Get the timestamp value. + * Get the date and time of the operation. * * @return the timestamp value */ @@ -82,7 +82,7 @@ public DateTime timestamp() { } /** - * Get the serviceRequestId value. + * Get deployment operation service request id. * * @return the serviceRequestId value */ @@ -91,7 +91,7 @@ public String serviceRequestId() { } /** - * Get the statusCode value. + * Get operation status code. * * @return the statusCode value */ @@ -100,7 +100,7 @@ public String statusCode() { } /** - * Get the statusMessage value. + * Get operation status message. * * @return the statusMessage value */ @@ -109,7 +109,7 @@ public Object statusMessage() { } /** - * Get the targetResource value. + * Get the target resource. * * @return the targetResource value */ @@ -118,7 +118,7 @@ public TargetResource targetResource() { } /** - * Get the request value. + * Get the HTTP request message. * * @return the request value */ @@ -127,7 +127,7 @@ public HttpMessage request() { } /** - * Get the response value. + * Get the HTTP response message. * * @return the response value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentProperties.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentProperties.java index 908fa946b6d..1940edad21f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentProperties.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentProperties.java @@ -68,7 +68,7 @@ public class DeploymentProperties { private DebugSetting debugSetting; /** - * Get the template value. + * Get the template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. * * @return the template value */ @@ -77,7 +77,7 @@ public Object template() { } /** - * Set the template value. + * Set the template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. * * @param template the template value to set * @return the DeploymentProperties object itself. @@ -88,7 +88,7 @@ public DeploymentProperties withTemplate(Object template) { } /** - * Get the templateLink value. + * Get the URI of the template. Use either the templateLink property or the template property, but not both. * * @return the templateLink value */ @@ -97,7 +97,7 @@ public TemplateLink templateLink() { } /** - * Set the templateLink value. + * Set the URI of the template. Use either the templateLink property or the template property, but not both. * * @param templateLink the templateLink value to set * @return the DeploymentProperties object itself. @@ -108,7 +108,7 @@ public DeploymentProperties withTemplateLink(TemplateLink templateLink) { } /** - * Get the parameters value. + * Get name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string. * * @return the parameters value */ @@ -117,7 +117,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string. * * @param parameters the parameters value to set * @return the DeploymentProperties object itself. @@ -128,7 +128,7 @@ public DeploymentProperties withParameters(Object parameters) { } /** - * Get the parametersLink value. + * Get the URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. * * @return the parametersLink value */ @@ -137,7 +137,7 @@ public ParametersLink parametersLink() { } /** - * Set the parametersLink value. + * Set the URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. * * @param parametersLink the parametersLink value to set * @return the DeploymentProperties object itself. @@ -148,7 +148,7 @@ public DeploymentProperties withParametersLink(ParametersLink parametersLink) { } /** - * Get the mode value. + * Get the mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'Incremental', 'Complete'. * * @return the mode value */ @@ -157,7 +157,7 @@ public DeploymentMode mode() { } /** - * Set the mode value. + * Set the mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'Incremental', 'Complete'. * * @param mode the mode value to set * @return the DeploymentProperties object itself. @@ -168,7 +168,7 @@ public DeploymentProperties withMode(DeploymentMode mode) { } /** - * Get the debugSetting value. + * Get the debug setting of the deployment. * * @return the debugSetting value */ @@ -177,7 +177,7 @@ public DebugSetting debugSetting() { } /** - * Set the debugSetting value. + * Set the debug setting of the deployment. * * @param debugSetting the debugSetting value to set * @return the DeploymentProperties object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentPropertiesExtended.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentPropertiesExtended.java index 1c1e70c459e..59581c66435 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentPropertiesExtended.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentPropertiesExtended.java @@ -93,7 +93,7 @@ public class DeploymentPropertiesExtended { private DebugSetting debugSetting; /** - * Get the provisioningState value. + * Get the state of the provisioning. * * @return the provisioningState value */ @@ -102,7 +102,7 @@ public String provisioningState() { } /** - * Get the correlationId value. + * Get the correlation ID of the deployment. * * @return the correlationId value */ @@ -111,7 +111,7 @@ public String correlationId() { } /** - * Get the timestamp value. + * Get the timestamp of the template deployment. * * @return the timestamp value */ @@ -120,7 +120,7 @@ public DateTime timestamp() { } /** - * Get the outputs value. + * Get key/value pairs that represent deploymentoutput. * * @return the outputs value */ @@ -129,7 +129,7 @@ public Object outputs() { } /** - * Set the outputs value. + * Set key/value pairs that represent deploymentoutput. * * @param outputs the outputs value to set * @return the DeploymentPropertiesExtended object itself. @@ -140,7 +140,7 @@ public DeploymentPropertiesExtended withOutputs(Object outputs) { } /** - * Get the providers value. + * Get the list of resource providers needed for the deployment. * * @return the providers value */ @@ -149,7 +149,7 @@ public List providers() { } /** - * Set the providers value. + * Set the list of resource providers needed for the deployment. * * @param providers the providers value to set * @return the DeploymentPropertiesExtended object itself. @@ -160,7 +160,7 @@ public DeploymentPropertiesExtended withProviders(List providers) } /** - * Get the dependencies value. + * Get the list of deployment dependencies. * * @return the dependencies value */ @@ -169,7 +169,7 @@ public List dependencies() { } /** - * Set the dependencies value. + * Set the list of deployment dependencies. * * @param dependencies the dependencies value to set * @return the DeploymentPropertiesExtended object itself. @@ -180,7 +180,7 @@ public DeploymentPropertiesExtended withDependencies(List dependenci } /** - * Get the template value. + * Get the template content. Use only one of Template or TemplateLink. * * @return the template value */ @@ -189,7 +189,7 @@ public Object template() { } /** - * Set the template value. + * Set the template content. Use only one of Template or TemplateLink. * * @param template the template value to set * @return the DeploymentPropertiesExtended object itself. @@ -200,7 +200,7 @@ public DeploymentPropertiesExtended withTemplate(Object template) { } /** - * Get the templateLink value. + * Get the URI referencing the template. Use only one of Template or TemplateLink. * * @return the templateLink value */ @@ -209,7 +209,7 @@ public TemplateLink templateLink() { } /** - * Set the templateLink value. + * Set the URI referencing the template. Use only one of Template or TemplateLink. * * @param templateLink the templateLink value to set * @return the DeploymentPropertiesExtended object itself. @@ -220,7 +220,7 @@ public DeploymentPropertiesExtended withTemplateLink(TemplateLink templateLink) } /** - * Get the parameters value. + * Get deployment parameters. Use only one of Parameters or ParametersLink. * * @return the parameters value */ @@ -229,7 +229,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set deployment parameters. Use only one of Parameters or ParametersLink. * * @param parameters the parameters value to set * @return the DeploymentPropertiesExtended object itself. @@ -240,7 +240,7 @@ public DeploymentPropertiesExtended withParameters(Object parameters) { } /** - * Get the parametersLink value. + * Get the URI referencing the parameters. Use only one of Parameters or ParametersLink. * * @return the parametersLink value */ @@ -249,7 +249,7 @@ public ParametersLink parametersLink() { } /** - * Set the parametersLink value. + * Set the URI referencing the parameters. Use only one of Parameters or ParametersLink. * * @param parametersLink the parametersLink value to set * @return the DeploymentPropertiesExtended object itself. @@ -260,7 +260,7 @@ public DeploymentPropertiesExtended withParametersLink(ParametersLink parameters } /** - * Get the mode value. + * Get the deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete'. * * @return the mode value */ @@ -269,7 +269,7 @@ public DeploymentMode mode() { } /** - * Set the mode value. + * Set the deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete'. * * @param mode the mode value to set * @return the DeploymentPropertiesExtended object itself. @@ -280,7 +280,7 @@ public DeploymentPropertiesExtended withMode(DeploymentMode mode) { } /** - * Get the debugSetting value. + * Get the debug setting of the deployment. * * @return the debugSetting value */ @@ -289,7 +289,7 @@ public DebugSetting debugSetting() { } /** - * Set the debugSetting value. + * Set the debug setting of the deployment. * * @param debugSetting the debugSetting value to set * @return the DeploymentPropertiesExtended object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ErrorResponse.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ErrorResponse.java index d6464cf8e37..be820afc43c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ErrorResponse.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ErrorResponse.java @@ -11,8 +11,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Error reponse indicates ARM is not able to process the incoming request. The - * reason is provided in the error message. + * Error reponse indicates Azure Resource Manager is not able to process the + * incoming request. The reason is provided in the error message. */ public class ErrorResponse { /** @@ -34,7 +34,7 @@ public class ErrorResponse { private String errorMessage; /** - * Get the httpStatus value. + * Get http status code. * * @return the httpStatus value */ @@ -43,7 +43,7 @@ public String httpStatus() { } /** - * Set the httpStatus value. + * Set http status code. * * @param httpStatus the httpStatus value to set * @return the ErrorResponse object itself. @@ -54,7 +54,7 @@ public ErrorResponse withHttpStatus(String httpStatus) { } /** - * Get the errorCode value. + * Get error code. * * @return the errorCode value */ @@ -63,7 +63,7 @@ public String errorCode() { } /** - * Set the errorCode value. + * Set error code. * * @param errorCode the errorCode value to set * @return the ErrorResponse object itself. @@ -74,7 +74,7 @@ public ErrorResponse withErrorCode(String errorCode) { } /** - * Get the errorMessage value. + * Get error message indicating why the operation failed. * * @return the errorMessage value */ @@ -83,7 +83,7 @@ public String errorMessage() { } /** - * Set the errorMessage value. + * Set error message indicating why the operation failed. * * @param errorMessage the errorMessage value to set * @return the ErrorResponse object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ExportTemplateRequest.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ExportTemplateRequest.java new file mode 100644 index 00000000000..e9450030fb9 --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ExportTemplateRequest.java @@ -0,0 +1,74 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.resources; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Export resource group template request parameters. + */ +public class ExportTemplateRequest { + /** + * The IDs of the resources. The only supported string currently is '*' + * (all resources). Future updates will support exporting specific + * resources. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * The export template options. Supported values include + * 'IncludeParameterDefaultValue', 'IncludeComments' or + * 'IncludeParameterDefaultValue, IncludeComments. + */ + @JsonProperty(value = "options") + private String options; + + /** + * Get the IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set the IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources. + * + * @param resources the resources value to set + * @return the ExportTemplateRequest object itself. + */ + public ExportTemplateRequest withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments. + * + * @return the options value + */ + public String options() { + return this.options; + } + + /** + * Set the export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments. + * + * @param options the options value to set + * @return the ExportTemplateRequest object itself. + */ + public ExportTemplateRequest withOptions(String options) { + this.options = options; + return this; + } + +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/FeatureProperties.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/FeatureProperties.java index 1867d0b4110..728fd92d5ab 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/FeatureProperties.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/FeatureProperties.java @@ -21,7 +21,7 @@ public class FeatureProperties { private String state; /** - * Get the state value. + * Get the registration state of the feature for the subscription. * * @return the state value */ @@ -30,7 +30,7 @@ public String state() { } /** - * Set the state value. + * Set the registration state of the feature for the subscription. * * @param state the state value to set * @return the FeatureProperties object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResourceFilter.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResourceFilter.java index f4b2dfbfe41..bbbc606eb45 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResourceFilter.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResourceFilter.java @@ -33,7 +33,7 @@ public class GenericResourceFilter { private String tagvalue; /** - * Get the resourceType value. + * Get the resource type. * * @return the resourceType value */ @@ -42,7 +42,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set the resource type. * * @param resourceType the resourceType value to set * @return the GenericResourceFilter object itself. @@ -53,7 +53,7 @@ public GenericResourceFilter withResourceType(String resourceType) { } /** - * Get the tagname value. + * Get the tag name. * * @return the tagname value */ @@ -62,7 +62,7 @@ public String tagname() { } /** - * Set the tagname value. + * Set the tag name. * * @param tagname the tagname value to set * @return the GenericResourceFilter object itself. @@ -73,7 +73,7 @@ public GenericResourceFilter withTagname(String tagname) { } /** - * Get the tagvalue value. + * Get the tag value. * * @return the tagvalue value */ @@ -82,7 +82,7 @@ public String tagvalue() { } /** - * Set the tagvalue value. + * Set the tag value. * * @param tagvalue the tagvalue value to set * @return the GenericResourceFilter object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/HttpMessage.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/HttpMessage.java index 6af003a631f..4a7991d376b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/HttpMessage.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/HttpMessage.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * HTTP message. + * The HttpMessage model. */ public class HttpMessage { /** @@ -21,7 +21,7 @@ public class HttpMessage { private Object content; /** - * Get the content value. + * Get hTTP message content. * * @return the content value */ @@ -30,7 +30,7 @@ public Object content() { } /** - * Set the content value. + * Set hTTP message content. * * @param content the content value to set * @return the HttpMessage object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Identity.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Identity.java index e0d54751017..a98ab981d36 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Identity.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Identity.java @@ -33,7 +33,7 @@ public class Identity { private ResourceIdentityType type; /** - * Get the principalId value. + * Get the principal ID of resource identity. * * @return the principalId value */ @@ -42,7 +42,7 @@ public String principalId() { } /** - * Get the tenantId value. + * Get the tenant ID of resource. * * @return the tenantId value */ @@ -51,7 +51,7 @@ public String tenantId() { } /** - * Get the type value. + * Get the identity type. Possible values include: 'SystemAssigned'. * * @return the type value */ @@ -60,7 +60,7 @@ public ResourceIdentityType type() { } /** - * Set the type value. + * Set the identity type. Possible values include: 'SystemAssigned'. * * @param type the type value to set * @return the Identity object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ParametersLink.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ParametersLink.java index ebec21001bf..4fa67bb6e04 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ParametersLink.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ParametersLink.java @@ -27,7 +27,7 @@ public class ParametersLink { private String contentVersion; /** - * Get the uri value. + * Get the URI of the parameters file. * * @return the uri value */ @@ -36,7 +36,7 @@ public String uri() { } /** - * Set the uri value. + * Set the URI of the parameters file. * * @param uri the uri value to set * @return the ParametersLink object itself. @@ -47,7 +47,7 @@ public ParametersLink withUri(String uri) { } /** - * Get the contentVersion value. + * Get if included, must match the ContentVersion in the template. * * @return the contentVersion value */ @@ -56,7 +56,7 @@ public String contentVersion() { } /** - * Set the contentVersion value. + * Set if included, must match the ContentVersion in the template. * * @param contentVersion the contentVersion value to set * @return the ParametersLink object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Plan.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Plan.java index a0132bc9a73..745fa508a3f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Plan.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Plan.java @@ -39,13 +39,7 @@ public class Plan { private String promotionCode; /** - * The plan's version. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the name value. + * Get the plan ID. * * @return the name value */ @@ -54,7 +48,7 @@ public String name() { } /** - * Set the name value. + * Set the plan ID. * * @param name the name value to set * @return the Plan object itself. @@ -65,7 +59,7 @@ public Plan withName(String name) { } /** - * Get the publisher value. + * Get the publisher ID. * * @return the publisher value */ @@ -74,7 +68,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set the publisher ID. * * @param publisher the publisher value to set * @return the Plan object itself. @@ -85,7 +79,7 @@ public Plan withPublisher(String publisher) { } /** - * Get the product value. + * Get the offer ID. * * @return the product value */ @@ -94,7 +88,7 @@ public String product() { } /** - * Set the product value. + * Set the offer ID. * * @param product the product value to set * @return the Plan object itself. @@ -105,7 +99,7 @@ public Plan withProduct(String product) { } /** - * Get the promotionCode value. + * Get the promotion code. * * @return the promotionCode value */ @@ -114,7 +108,7 @@ public String promotionCode() { } /** - * Set the promotionCode value. + * Set the promotion code. * * @param promotionCode the promotionCode value to set * @return the Plan object itself. @@ -124,24 +118,4 @@ public Plan withPromotionCode(String promotionCode) { return this; } - /** - * Get the version value. - * - * @return the version value - */ - public String version() { - return this.version; - } - - /** - * Set the version value. - * - * @param version the version value to set - * @return the Plan object itself. - */ - public Plan withVersion(String version) { - this.version = version; - return this; - } - } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicyDefinitionReference.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicyDefinitionReference.java index df5f9f50cfc..444c7e6180d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicyDefinitionReference.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicyDefinitionReference.java @@ -27,7 +27,7 @@ public class PolicyDefinitionReference { private Object parameters; /** - * Get the policyDefinitionId value. + * Get the ID of the policy definition or policy set definition. * * @return the policyDefinitionId value */ @@ -36,7 +36,7 @@ public String policyDefinitionId() { } /** - * Set the policyDefinitionId value. + * Set the ID of the policy definition or policy set definition. * * @param policyDefinitionId the policyDefinitionId value to set * @return the PolicyDefinitionReference object itself. @@ -47,7 +47,7 @@ public PolicyDefinitionReference withPolicyDefinitionId(String policyDefinitionI } /** - * Get the parameters value. + * Get required if a parameter is used in policy rule. * * @return the parameters value */ @@ -56,7 +56,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set required if a parameter is used in policy rule. * * @param parameters the parameters value to set * @return the PolicyDefinitionReference object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicySku.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicySku.java index ebc31162484..bb422d7f71e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicySku.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/PolicySku.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The policy sku. + * The policy sku. This property is optional, obsolete, and will be ignored. */ public class PolicySku { /** @@ -27,7 +27,7 @@ public class PolicySku { private String tier; /** - * Get the name value. + * Get the name of the policy sku. Possible values are A0 and A1. * * @return the name value */ @@ -36,7 +36,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the policy sku. Possible values are A0 and A1. * * @param name the name value to set * @return the PolicySku object itself. @@ -47,7 +47,7 @@ public PolicySku withName(String name) { } /** - * Get the tier value. + * Get the policy sku tier. Possible values are Free and Standard. * * @return the tier value */ @@ -56,7 +56,7 @@ public String tier() { } /** - * Set the tier value. + * Set the policy sku tier. Possible values are Free and Standard. * * @param tier the tier value to set * @return the PolicySku object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ProviderResourceType.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ProviderResourceType.java index 480fc91db2b..e872cea6f53 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ProviderResourceType.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ProviderResourceType.java @@ -47,7 +47,7 @@ public class ProviderResourceType { private Map properties; /** - * Get the resourceType value. + * Get the resource type. * * @return the resourceType value */ @@ -56,7 +56,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set the resource type. * * @param resourceType the resourceType value to set * @return the ProviderResourceType object itself. @@ -67,7 +67,7 @@ public ProviderResourceType withResourceType(String resourceType) { } /** - * Get the locations value. + * Get the collection of locations where this resource type can be created. * * @return the locations value */ @@ -76,7 +76,7 @@ public List locations() { } /** - * Set the locations value. + * Set the collection of locations where this resource type can be created. * * @param locations the locations value to set * @return the ProviderResourceType object itself. @@ -87,7 +87,7 @@ public ProviderResourceType withLocations(List locations) { } /** - * Get the aliases value. + * Get the aliases that are supported by this resource type. * * @return the aliases value */ @@ -96,7 +96,7 @@ public List aliases() { } /** - * Set the aliases value. + * Set the aliases that are supported by this resource type. * * @param aliases the aliases value to set * @return the ProviderResourceType object itself. @@ -107,7 +107,7 @@ public ProviderResourceType withAliases(List aliases) { } /** - * Get the apiVersions value. + * Get the API version. * * @return the apiVersions value */ @@ -116,7 +116,7 @@ public List apiVersions() { } /** - * Set the apiVersions value. + * Set the API version. * * @param apiVersions the apiVersions value to set * @return the ProviderResourceType object itself. @@ -127,7 +127,7 @@ public ProviderResourceType withApiVersions(List apiVersions) { } /** - * Get the properties value. + * Get the properties. * * @return the properties value */ @@ -136,7 +136,7 @@ public Map properties() { } /** - * Set the properties value. + * Set the properties. * * @param properties the properties value to set * @return the ProviderResourceType object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupFilter.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupFilter.java index a40cd41c268..6f2c2642245 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupFilter.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupFilter.java @@ -27,7 +27,7 @@ public class ResourceGroupFilter { private String tagValue; /** - * Get the tagName value. + * Get the tag name. * * @return the tagName value */ @@ -36,7 +36,7 @@ public String tagName() { } /** - * Set the tagName value. + * Set the tag name. * * @param tagName the tagName value to set * @return the ResourceGroupFilter object itself. @@ -47,7 +47,7 @@ public ResourceGroupFilter withTagName(String tagName) { } /** - * Get the tagValue value. + * Get the tag value. * * @return the tagValue value */ @@ -56,7 +56,7 @@ public String tagValue() { } /** - * Set the tagValue value. + * Set the tag value. * * @param tagValue the tagValue value to set * @return the ResourceGroupFilter object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupProperties.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupProperties.java index cf4ecdaaf6d..b28a4af0a66 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupProperties.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupProperties.java @@ -21,7 +21,7 @@ public class ResourceGroupProperties { private String provisioningState; /** - * Get the provisioningState value. + * Get the provisioning state. * * @return the provisioningState value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceManagementErrorWithDetails.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceManagementErrorWithDetails.java index 6bde7f126f6..fae85e340af 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceManagementErrorWithDetails.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceManagementErrorWithDetails.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The detailed error message of resource management. + * The ResourceManagementErrorWithDetails model. */ public class ResourceManagementErrorWithDetails { /** @@ -40,7 +40,7 @@ public class ResourceManagementErrorWithDetails { private List details; /** - * Get the code value. + * Get the error code returned when exporting the template. * * @return the code value */ @@ -49,7 +49,7 @@ public String code() { } /** - * Get the message value. + * Get the error message describing the export error. * * @return the message value */ @@ -58,7 +58,7 @@ public String message() { } /** - * Get the target value. + * Get the target of the error. * * @return the target value */ @@ -67,7 +67,7 @@ public String target() { } /** - * Get the details value. + * Get validation error. * * @return the details value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceProviderOperationDisplayProperties.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceProviderOperationDisplayProperties.java index 102de9bf0dd..40a645ad98f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceProviderOperationDisplayProperties.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceProviderOperationDisplayProperties.java @@ -45,7 +45,7 @@ public class ResourceProviderOperationDisplayProperties { private String description; /** - * Get the publisher value. + * Get operation description. * * @return the publisher value */ @@ -54,7 +54,7 @@ public String publisher() { } /** - * Set the publisher value. + * Set operation description. * * @param publisher the publisher value to set * @return the ResourceProviderOperationDisplayProperties object itself. @@ -65,7 +65,7 @@ public ResourceProviderOperationDisplayProperties withPublisher(String publisher } /** - * Get the provider value. + * Get operation provider. * * @return the provider value */ @@ -74,7 +74,7 @@ public String provider() { } /** - * Set the provider value. + * Set operation provider. * * @param provider the provider value to set * @return the ResourceProviderOperationDisplayProperties object itself. @@ -85,7 +85,7 @@ public ResourceProviderOperationDisplayProperties withProvider(String provider) } /** - * Get the resource value. + * Get operation resource. * * @return the resource value */ @@ -94,7 +94,7 @@ public String resource() { } /** - * Set the resource value. + * Set operation resource. * * @param resource the resource value to set * @return the ResourceProviderOperationDisplayProperties object itself. @@ -105,7 +105,7 @@ public ResourceProviderOperationDisplayProperties withResource(String resource) } /** - * Get the operation value. + * Get operation. * * @return the operation value */ @@ -114,7 +114,7 @@ public String operation() { } /** - * Set the operation value. + * Set operation. * * @param operation the operation value to set * @return the ResourceProviderOperationDisplayProperties object itself. @@ -125,7 +125,7 @@ public ResourceProviderOperationDisplayProperties withOperation(String operation } /** - * Get the description value. + * Get operation description. * * @return the description value */ @@ -134,7 +134,7 @@ public String description() { } /** - * Set the description value. + * Set operation description. * * @param description the description value to set * @return the ResourceProviderOperationDisplayProperties object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourcesMoveInfo.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourcesMoveInfo.java new file mode 100644 index 00000000000..50eec1a12a0 --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourcesMoveInfo.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.resources; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters of move resources. + */ +public class ResourcesMoveInfo { + /** + * The IDs of the resources. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * The target resource group. + */ + @JsonProperty(value = "targetResourceGroup") + private String targetResourceGroup; + + /** + * Get the IDs of the resources. + * + * @return the resources value + */ + public List resources() { + return this.resources; + } + + /** + * Set the IDs of the resources. + * + * @param resources the resources value to set + * @return the ResourcesMoveInfo object itself. + */ + public ResourcesMoveInfo withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Get the target resource group. + * + * @return the targetResourceGroup value + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Set the target resource group. + * + * @param targetResourceGroup the targetResourceGroup value to set + * @return the ResourcesMoveInfo object itself. + */ + public ResourcesMoveInfo withTargetResourceGroup(String targetResourceGroup) { + this.targetResourceGroup = targetResourceGroup; + return this; + } + +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Sku.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Sku.java index 1664395e87c..caf6f206e11 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Sku.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Sku.java @@ -51,7 +51,7 @@ public class Sku { private Integer capacity; /** - * Get the name value. + * Get the SKU name. * * @return the name value */ @@ -60,7 +60,7 @@ public String name() { } /** - * Set the name value. + * Set the SKU name. * * @param name the name value to set * @return the Sku object itself. @@ -71,7 +71,7 @@ public Sku withName(String name) { } /** - * Get the tier value. + * Get the SKU tier. * * @return the tier value */ @@ -80,7 +80,7 @@ public String tier() { } /** - * Set the tier value. + * Set the SKU tier. * * @param tier the tier value to set * @return the Sku object itself. @@ -91,7 +91,7 @@ public Sku withTier(String tier) { } /** - * Get the size value. + * Get the SKU size. * * @return the size value */ @@ -100,7 +100,7 @@ public String size() { } /** - * Set the size value. + * Set the SKU size. * * @param size the size value to set * @return the Sku object itself. @@ -111,7 +111,7 @@ public Sku withSize(String size) { } /** - * Get the family value. + * Get the SKU family. * * @return the family value */ @@ -120,7 +120,7 @@ public String family() { } /** - * Set the family value. + * Set the SKU family. * * @param family the family value to set * @return the Sku object itself. @@ -131,7 +131,7 @@ public Sku withFamily(String family) { } /** - * Get the model value. + * Get the SKU model. * * @return the model value */ @@ -140,7 +140,7 @@ public String model() { } /** - * Set the model value. + * Set the SKU model. * * @param model the model value to set * @return the Sku object itself. @@ -151,7 +151,7 @@ public Sku withModel(String model) { } /** - * Get the capacity value. + * Get the SKU capacity. * * @return the capacity value */ @@ -160,7 +160,7 @@ public Integer capacity() { } /** - * Set the capacity value. + * Set the SKU capacity. * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/SubscriptionPolicies.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/SubscriptionPolicies.java index 928b51a1e85..82ec1c3b2cf 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/SubscriptionPolicies.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/SubscriptionPolicies.java @@ -37,7 +37,7 @@ public class SubscriptionPolicies { private SpendingLimit spendingLimit; /** - * Get the locationPlacementId value. + * Get the subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions. * * @return the locationPlacementId value */ @@ -46,7 +46,7 @@ public String locationPlacementId() { } /** - * Get the quotaId value. + * Get the subscription quota ID. * * @return the quotaId value */ @@ -55,7 +55,7 @@ public String quotaId() { } /** - * Get the spendingLimit value. + * Get the subscription spending limit. Possible values include: 'On', 'Off', 'CurrentPeriodOff'. * * @return the spendingLimit value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TagCount.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TagCount.java index c76b95c9121..42d01c9b329 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TagCount.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TagCount.java @@ -27,7 +27,7 @@ public class TagCount { private Integer value; /** - * Get the type value. + * Get type of count. * * @return the type value */ @@ -36,7 +36,7 @@ public String type() { } /** - * Set the type value. + * Set type of count. * * @param type the type value to set * @return the TagCount object itself. @@ -47,7 +47,7 @@ public TagCount withType(String type) { } /** - * Get the value value. + * Get value of count. * * @return the value value */ @@ -56,7 +56,7 @@ public Integer value() { } /** - * Set the value value. + * Set value of count. * * @param value the value value to set * @return the TagCount object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TargetResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TargetResource.java index 9e45c17adeb..9eb4ab41331 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TargetResource.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TargetResource.java @@ -33,7 +33,7 @@ public class TargetResource { private String resourceType; /** - * Get the id value. + * Get the ID of the resource. * * @return the id value */ @@ -42,7 +42,7 @@ public String id() { } /** - * Set the id value. + * Set the ID of the resource. * * @param id the id value to set * @return the TargetResource object itself. @@ -53,7 +53,7 @@ public TargetResource withId(String id) { } /** - * Get the resourceName value. + * Get the name of the resource. * * @return the resourceName value */ @@ -62,7 +62,7 @@ public String resourceName() { } /** - * Set the resourceName value. + * Set the name of the resource. * * @param resourceName the resourceName value to set * @return the TargetResource object itself. @@ -73,7 +73,7 @@ public TargetResource withResourceName(String resourceName) { } /** - * Get the resourceType value. + * Get the type of the resource. * * @return the resourceType value */ @@ -82,7 +82,7 @@ public String resourceType() { } /** - * Set the resourceType value. + * Set the type of the resource. * * @param resourceType the resourceType value to set * @return the TargetResource object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TemplateLink.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TemplateLink.java index 9b100a41e26..3e14c958513 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TemplateLink.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/TemplateLink.java @@ -27,7 +27,7 @@ public class TemplateLink { private String contentVersion; /** - * Get the uri value. + * Get the URI of the template to deploy. * * @return the uri value */ @@ -36,7 +36,7 @@ public String uri() { } /** - * Set the uri value. + * Set the URI of the template to deploy. * * @param uri the uri value to set * @return the TemplateLink object itself. @@ -47,7 +47,7 @@ public TemplateLink withUri(String uri) { } /** - * Get the contentVersion value. + * Get if included, must match the ContentVersion in the template. * * @return the contentVersion value */ @@ -56,7 +56,7 @@ public String contentVersion() { } /** - * Set the contentVersion value. + * Set if included, must match the ContentVersion in the template. * * @param contentVersion the contentVersion value to set * @return the TemplateLink object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExportResultInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExportResultInner.java index 354e6538055..611e91509c2 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExportResultInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExportResultInner.java @@ -21,7 +21,7 @@ public class DeploymentExportResultInner { private Object template; /** - * Get the template value. + * Get the template content. * * @return the template value */ @@ -30,7 +30,7 @@ public Object template() { } /** - * Set the template value. + * Set the template content. * * @param template the template value to set * @return the DeploymentExportResultInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExtendedInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExtendedInner.java index ed87fc8907d..37ceb6d2529 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExtendedInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentExtendedInner.java @@ -18,7 +18,7 @@ public class DeploymentExtendedInner { /** * The ID of the deployment. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** @@ -34,7 +34,7 @@ public class DeploymentExtendedInner { private DeploymentPropertiesExtended properties; /** - * Get the id value. + * Get the ID of the deployment. * * @return the id value */ @@ -43,18 +43,7 @@ public String id() { } /** - * Set the id value. - * - * @param id the id value to set - * @return the DeploymentExtendedInner object itself. - */ - public DeploymentExtendedInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name value. + * Get the name of the deployment. * * @return the name value */ @@ -63,7 +52,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the deployment. * * @param name the name value to set * @return the DeploymentExtendedInner object itself. @@ -74,7 +63,7 @@ public DeploymentExtendedInner withName(String name) { } /** - * Get the properties value. + * Get deployment properties. * * @return the properties value */ @@ -83,7 +72,7 @@ public DeploymentPropertiesExtended properties() { } /** - * Set the properties value. + * Set deployment properties. * * @param properties the properties value to set * @return the DeploymentExtendedInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentInner.java index 5eb62e8a7b4..01597af8555 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentInner.java @@ -22,7 +22,7 @@ public class DeploymentInner { private DeploymentProperties properties; /** - * Get the properties value. + * Get the deployment properties. * * @return the properties value */ @@ -31,7 +31,7 @@ public DeploymentProperties properties() { } /** - * Set the properties value. + * Set the deployment properties. * * @param properties the properties value to set * @return the DeploymentInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationInner.java index c3efcb23447..593c804ad8f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationInner.java @@ -34,7 +34,7 @@ public class DeploymentOperationInner { private DeploymentOperationProperties properties; /** - * Get the id value. + * Get full deployment operation ID. * * @return the id value */ @@ -43,7 +43,7 @@ public String id() { } /** - * Get the operationId value. + * Get deployment operation ID. * * @return the operationId value */ @@ -52,7 +52,7 @@ public String operationId() { } /** - * Get the properties value. + * Get deployment properties. * * @return the properties value */ @@ -61,7 +61,7 @@ public DeploymentOperationProperties properties() { } /** - * Set the properties value. + * Set deployment properties. * * @param properties the properties value to set * @return the DeploymentOperationInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentValidateResultInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentValidateResultInner.java index b08cc84fbd3..711f5533576 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentValidateResultInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentValidateResultInner.java @@ -29,7 +29,7 @@ public class DeploymentValidateResultInner { private DeploymentPropertiesExtended properties; /** - * Get the error value. + * Get validation error. * * @return the error value */ @@ -38,7 +38,7 @@ public ResourceManagementErrorWithDetails error() { } /** - * Set the error value. + * Set validation error. * * @param error the error value to set * @return the DeploymentValidateResultInner object itself. @@ -49,7 +49,7 @@ public DeploymentValidateResultInner withError(ResourceManagementErrorWithDetail } /** - * Get the properties value. + * Get the template deployment properties. * * @return the properties value */ @@ -58,7 +58,7 @@ public DeploymentPropertiesExtended properties() { } /** - * Set the properties value. + * Set the template deployment properties. * * @param properties the properties value to set * @return the DeploymentValidateResultInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeatureResultInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeatureResultInner.java index 72f207764a5..6164ecb474a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeatureResultInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeatureResultInner.java @@ -40,7 +40,7 @@ public class FeatureResultInner { private String type; /** - * Get the name value. + * Get the name of the feature. * * @return the name value */ @@ -49,7 +49,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the feature. * * @param name the name value to set * @return the FeatureResultInner object itself. @@ -60,7 +60,7 @@ public FeatureResultInner withName(String name) { } /** - * Get the properties value. + * Get properties of the previewed feature. * * @return the properties value */ @@ -69,7 +69,7 @@ public FeatureProperties properties() { } /** - * Set the properties value. + * Set properties of the previewed feature. * * @param properties the properties value to set * @return the FeatureResultInner object itself. @@ -80,7 +80,7 @@ public FeatureResultInner withProperties(FeatureProperties properties) { } /** - * Get the id value. + * Get the resource ID of the feature. * * @return the id value */ @@ -89,7 +89,7 @@ public String id() { } /** - * Set the id value. + * Set the resource ID of the feature. * * @param id the id value to set * @return the FeatureResultInner object itself. @@ -100,7 +100,7 @@ public FeatureResultInner withId(String id) { } /** - * Get the type value. + * Get the resource type of the feature. * * @return the type value */ @@ -109,7 +109,7 @@ public String type() { } /** - * Set the type value. + * Set the resource type of the feature. * * @param type the type value to set * @return the FeatureResultInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceInner.java index b43c4f0e5a8..18eb75812e0 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceInner.java @@ -12,11 +12,13 @@ import com.microsoft.azure.management.resources.Sku; import com.microsoft.azure.management.resources.Identity; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Resource information. */ +@SkipParentValidation public class GenericResourceInner extends Resource { /** * The plan of the resource. @@ -55,7 +57,7 @@ public class GenericResourceInner extends Resource { private Identity identity; /** - * Get the plan value. + * Get the plan of the resource. * * @return the plan value */ @@ -64,7 +66,7 @@ public Plan plan() { } /** - * Set the plan value. + * Set the plan of the resource. * * @param plan the plan value to set * @return the GenericResourceInner object itself. @@ -75,7 +77,7 @@ public GenericResourceInner withPlan(Plan plan) { } /** - * Get the properties value. + * Get the resource properties. * * @return the properties value */ @@ -84,7 +86,7 @@ public Object properties() { } /** - * Set the properties value. + * Set the resource properties. * * @param properties the properties value to set * @return the GenericResourceInner object itself. @@ -95,7 +97,7 @@ public GenericResourceInner withProperties(Object properties) { } /** - * Get the kind value. + * Get the kind of the resource. * * @return the kind value */ @@ -104,7 +106,7 @@ public String kind() { } /** - * Set the kind value. + * Set the kind of the resource. * * @param kind the kind value to set * @return the GenericResourceInner object itself. @@ -115,7 +117,7 @@ public GenericResourceInner withKind(String kind) { } /** - * Get the managedBy value. + * Get iD of the resource that manages this resource. * * @return the managedBy value */ @@ -124,7 +126,7 @@ public String managedBy() { } /** - * Set the managedBy value. + * Set iD of the resource that manages this resource. * * @param managedBy the managedBy value to set * @return the GenericResourceInner object itself. @@ -135,7 +137,7 @@ public GenericResourceInner withManagedBy(String managedBy) { } /** - * Get the sku value. + * Get the SKU of the resource. * * @return the sku value */ @@ -144,7 +146,7 @@ public Sku sku() { } /** - * Set the sku value. + * Set the SKU of the resource. * * @param sku the sku value to set * @return the GenericResourceInner object itself. @@ -155,7 +157,7 @@ public GenericResourceInner withSku(Sku sku) { } /** - * Get the identity value. + * Get the identity of the resource. * * @return the identity value */ @@ -164,7 +166,7 @@ public Identity identity() { } /** - * Set the identity value. + * Set the identity of the resource. * * @param identity the identity value to set * @return the GenericResourceInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/LocationInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/LocationInner.java index 11efc2d460b..abf715c57ce 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/LocationInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/LocationInner.java @@ -52,7 +52,7 @@ public class LocationInner { private String longitude; /** - * Get the id value. + * Get the fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. * * @return the id value */ @@ -61,7 +61,7 @@ public String id() { } /** - * Get the subscriptionId value. + * Get the subscription ID. * * @return the subscriptionId value */ @@ -70,7 +70,7 @@ public String subscriptionId() { } /** - * Get the name value. + * Get the location name. * * @return the name value */ @@ -79,7 +79,7 @@ public String name() { } /** - * Get the displayName value. + * Get the display name of the location. * * @return the displayName value */ @@ -88,7 +88,7 @@ public String displayName() { } /** - * Get the latitude value. + * Get the latitude of the location. * * @return the latitude value */ @@ -97,7 +97,7 @@ public String latitude() { } /** - * Get the longitude value. + * Get the longitude of the location. * * @return the longitude value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PageImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PageImpl.java index 9d9408604d5..aa7cd7094b0 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PageImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PageImpl.java @@ -22,7 +22,7 @@ public class PageImpl implements Page { /** * The link to the next page. */ - @JsonProperty("nextLink") + @JsonProperty("") private String nextPageLink; /** diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentInner.java index 0042377dd86..e5fd4f1565d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentInner.java @@ -8,12 +8,11 @@ package com.microsoft.azure.management.resources.implementation; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import com.microsoft.azure.management.resources.PolicySku; +import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import java.util.List; - /** * The policy assignment. */ @@ -26,7 +25,7 @@ public class PolicyAssignmentInner { private String displayName; /** - * The ID of the policy definition. + * The ID of the policy definition or policy set definition being assigned. */ @JsonProperty(value = "properties.policyDefinitionId") private String policyDefinitionId; @@ -80,13 +79,14 @@ public class PolicyAssignmentInner { private String name; /** - * The policy sku. + * The policy sku. This property is optional, obsolete, and will be + * ignored. */ @JsonProperty(value = "sku") private PolicySku sku; /** - * Get the displayName value. + * Get the display name of the policy assignment. * * @return the displayName value */ @@ -95,7 +95,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the display name of the policy assignment. * * @param displayName the displayName value to set * @return the PolicyAssignmentInner object itself. @@ -106,7 +106,7 @@ public PolicyAssignmentInner withDisplayName(String displayName) { } /** - * Get the policyDefinitionId value. + * Get the ID of the policy definition or policy set definition being assigned. * * @return the policyDefinitionId value */ @@ -115,7 +115,7 @@ public String policyDefinitionId() { } /** - * Set the policyDefinitionId value. + * Set the ID of the policy definition or policy set definition being assigned. * * @param policyDefinitionId the policyDefinitionId value to set * @return the PolicyAssignmentInner object itself. @@ -126,7 +126,7 @@ public PolicyAssignmentInner withPolicyDefinitionId(String policyDefinitionId) { } /** - * Get the scope value. + * Get the scope for the policy assignment. * * @return the scope value */ @@ -135,7 +135,7 @@ public String scope() { } /** - * Set the scope value. + * Set the scope for the policy assignment. * * @param scope the scope value to set * @return the PolicyAssignmentInner object itself. @@ -146,7 +146,7 @@ public PolicyAssignmentInner withScope(String scope) { } /** - * Get the notScopes value. + * Get the policy's excluded scopes. * * @return the notScopes value */ @@ -155,7 +155,7 @@ public List notScopes() { } /** - * Set the notScopes value. + * Set the policy's excluded scopes. * * @param notScopes the notScopes value to set * @return the PolicyAssignmentInner object itself. @@ -166,7 +166,7 @@ public PolicyAssignmentInner withNotScopes(List notScopes) { } /** - * Get the parameters value. + * Get required if a parameter is used in policy rule. * * @return the parameters value */ @@ -175,7 +175,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set required if a parameter is used in policy rule. * * @param parameters the parameters value to set * @return the PolicyAssignmentInner object itself. @@ -186,7 +186,7 @@ public PolicyAssignmentInner withParameters(Object parameters) { } /** - * Get the description value. + * Get this message will be part of response in case of policy violation. * * @return the description value */ @@ -195,7 +195,7 @@ public String description() { } /** - * Set the description value. + * Set this message will be part of response in case of policy violation. * * @param description the description value to set * @return the PolicyAssignmentInner object itself. @@ -206,7 +206,7 @@ public PolicyAssignmentInner withDescription(String description) { } /** - * Get the metadata value. + * Get the policy assignment metadata. * * @return the metadata value */ @@ -215,7 +215,7 @@ public Object metadata() { } /** - * Set the metadata value. + * Set the policy assignment metadata. * * @param metadata the metadata value to set * @return the PolicyAssignmentInner object itself. @@ -226,7 +226,7 @@ public PolicyAssignmentInner withMetadata(Object metadata) { } /** - * Get the id value. + * Get the ID of the policy assignment. * * @return the id value */ @@ -235,7 +235,7 @@ public String id() { } /** - * Get the type value. + * Get the type of the policy assignment. * * @return the type value */ @@ -244,7 +244,7 @@ public String type() { } /** - * Get the name value. + * Get the name of the policy assignment. * * @return the name value */ @@ -253,7 +253,7 @@ public String name() { } /** - * Get the sku value. + * Get the policy sku. This property is optional, obsolete, and will be ignored. * * @return the sku value */ @@ -262,7 +262,7 @@ public PolicySku sku() { } /** - * Set the sku value. + * Set the policy sku. This property is optional, obsolete, and will be ignored. * * @param sku the sku value to set * @return the PolicyAssignmentInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentsInner.java index 9e8c7a7e2f9..e9c0f2967db 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyAssignmentsInner.java @@ -115,8 +115,9 @@ interface PolicyAssignmentsService { /** * Deletes a policy assignment. + * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -129,8 +130,9 @@ public PolicyAssignmentInner delete(String scope, String policyAssignmentName) { /** * Deletes a policy assignment. + * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to delete. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -142,8 +144,9 @@ public ServiceFuture deleteAsync(String scope, String pol /** * Deletes a policy assignment. + * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -159,8 +162,9 @@ public PolicyAssignmentInner call(ServiceResponse respons /** * Deletes a policy assignment. + * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to delete. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -172,8 +176,10 @@ public Observable> deleteWithServiceRespo if (policyAssignmentName == null) { throw new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.delete(scope, policyAssignmentName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(scope, policyAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -196,10 +202,10 @@ private ServiceResponse deleteDelegate(Response createAsync(String scope, String pol } /** - * Creates a policy assignment. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. + * Creates or updates a policy assignment. + * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment. * @param parameters Parameters for the policy assignment. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -246,10 +252,10 @@ public PolicyAssignmentInner call(ServiceResponse respons } /** - * Creates a policy assignment. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. + * Creates or updates a policy assignment. + * This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment. * @param parameters Parameters for the policy assignment. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -265,9 +271,11 @@ public Observable> createWithServiceRespo if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2017-06-01-preview"; - return service.create(scope, policyAssignmentName, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.create(scope, policyAssignmentName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -289,9 +297,10 @@ private ServiceResponse createDelegate(Response getAsync(String scope, String policy } /** - * Gets a policy assignment. + * Retrieves a policy assignment. + * This operation retrieves a single policy assignment, given its name and the scope it was created at. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -333,9 +344,10 @@ public PolicyAssignmentInner call(ServiceResponse respons } /** - * Gets a policy assignment. + * Retrieves a policy assignment. + * This operation retrieves a single policy assignment, given its name and the scope it was created at. * - * @param scope The scope of the policy assignment. + * @param scope The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -347,8 +359,10 @@ public Observable> getWithServiceResponse if (policyAssignmentName == null) { throw new IllegalArgumentException("Parameter policyAssignmentName is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.get(scope, policyAssignmentName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(scope, policyAssignmentName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -370,7 +384,8 @@ private ServiceResponse getDelegate(Response nextPage(String nextPageLink) { } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -409,7 +425,8 @@ public Observable>> call(String next } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -426,7 +443,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param resourceGroupName The name of the resource group that contains policy assignments. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -460,9 +479,11 @@ public Observable>> listByResourceGr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } final String filter = null; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -477,10 +498,11 @@ public Observable>> call(Response nextPage(String nextPageLink) { } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param resourceGroupName The name of the resource group that contains policy assignments. - * @param filter The filter to apply on the operation. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -518,10 +541,11 @@ public Observable>> call(String next } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param resourceGroupName The name of the resource group that contains policy assignments. - * @param filter The filter to apply on the operation. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ @@ -536,10 +560,11 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * ServiceResponse> * @param resourceGroupName The name of the resource group that contains policy assignments. - ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyAssignmentInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -572,8 +598,10 @@ public Observable>> listByResourceGr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -595,13 +623,14 @@ private ServiceResponse> listByResourceGroupDele } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -618,13 +647,14 @@ public Page nextPage(String nextPageLink) { } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -642,13 +672,14 @@ public Observable>> call(String next } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ @@ -663,13 +694,14 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyAssignmentInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -717,9 +750,11 @@ public Observable>> listForResourceS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } final String filter = null; - return service.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -734,14 +769,15 @@ public Observable>> call(Response nextPage(String nextPageLink) { } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. - * @param filter The filter to apply on the operation. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -783,14 +820,15 @@ public Observable>> call(String next } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - * @param resourceProviderNamespace The namespace of the resource provider. - * @param parentResourcePath The parent resource path. - * @param resourceType The resource type. - * @param resourceName The name of the resource with policy assignments. - * @param filter The filter to apply on the operation. + * @param resourceGroupName The name of the resource group containing the resource. + * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + * @param parentResourcePath The parent resource path. Use empty string if there is none. + * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + * @param resourceName The name of the resource. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ @@ -805,14 +843,15 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * - ServiceResponse> * @param resourceGroupName The name of the resource group containing the resource. The name is case insensitive. - ServiceResponse> * @param resourceProviderNamespace The namespace of the resource provider. - ServiceResponse> * @param parentResourcePath The parent resource path. - ServiceResponse> * @param resourceType The resource type. - ServiceResponse> * @param resourceName The name of the resource with policy assignments. - ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param resourceGroupName The name of the resource group containing the resource. + ServiceResponse> * @param resourceProviderNamespace The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) + ServiceResponse> * @param parentResourcePath The parent resource path. Use empty string if there is none. + ServiceResponse> * @param resourceType The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). + ServiceResponse> * @param resourceName The name of the resource. + ServiceResponse> * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyAssignmentInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -861,8 +901,10 @@ public Observable>> listForResourceS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -884,7 +926,8 @@ private ServiceResponse> listForResourceDelegate } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -902,7 +945,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -921,7 +965,8 @@ public Observable>> call(String next } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object @@ -937,7 +982,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyAssignmentInner> object wrapped in {@link ServiceResponse} if successful. @@ -966,9 +1013,11 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } final String filter = null; - return service.list(this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -983,9 +1032,10 @@ public Observable>> call(Response nextPage(String nextPageLink) { } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * - * @param filter The filter to apply on the operation. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1022,9 +1073,10 @@ public Observable>> call(String next } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * - * @param filter The filter to apply on the operation. + * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyAssignmentInner> object */ @@ -1039,9 +1091,10 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * - ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyAssignmentInner> object wrapped in {@link ServiceResponse} if successful. */ @@ -1070,8 +1124,10 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.list(this.client.subscriptionId(), filter, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1093,10 +1149,10 @@ private ServiceResponse> listDelegate(Response deleteByIdAsync(String policyAssignm } /** - * Deletes a policy assignment by ID. - * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Deletes a policy assignment. + * This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource). * - * @param policyAssignmentId The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ @@ -1137,10 +1193,10 @@ public PolicyAssignmentInner call(ServiceResponse respons } /** - * Deletes a policy assignment by ID. - * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Deletes a policy assignment. + * This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource). * - * @param policyAssignmentId The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ @@ -1148,8 +1204,10 @@ public Observable> deleteByIdWithServiceR if (policyAssignmentId == null) { throw new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.deleteById(policyAssignmentId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteById(policyAssignmentId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1166,15 +1224,16 @@ public Observable> call(Response deleteByIdDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) .build(response); } /** - * Creates a policy assignment by ID. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Creates or updates a policy assignment. + * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param parameters Parameters for policy assignment. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -1186,10 +1245,10 @@ public PolicyAssignmentInner createById(String policyAssignmentId, PolicyAssignm } /** - * Creates a policy assignment by ID. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Creates or updates a policy assignment. + * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param parameters Parameters for policy assignment. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1200,10 +1259,10 @@ public ServiceFuture createByIdAsync(String policyAssignm } /** - * Creates a policy assignment by ID. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Creates or updates a policy assignment. + * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param parameters Parameters for policy assignment. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -1218,10 +1277,10 @@ public PolicyAssignmentInner call(ServiceResponse respons } /** - * Creates a policy assignment by ID. - * Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Creates or updates a policy assignment. + * This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @param parameters Parameters for policy assignment. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object @@ -1233,9 +1292,11 @@ public Observable> createByIdWithServiceR if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2017-06-01-preview"; - return service.createById(policyAssignmentId, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.createById(policyAssignmentId, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1257,10 +1318,10 @@ private ServiceResponse createByIdDelegate(Response getByIdAsync(String policyAssignment } /** - * Gets a policy assignment by ID. - * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Retrieves the policy assignment with the given ID. + * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ @@ -1301,10 +1362,10 @@ public PolicyAssignmentInner call(ServiceResponse respons } /** - * Gets a policy assignment by ID. - * When providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources. + * Retrieves the policy assignment with the given ID. + * The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. * - * @param policyAssignmentId The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. + * @param policyAssignmentId The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ @@ -1312,8 +1373,10 @@ public Observable> getByIdWithServiceResp if (policyAssignmentId == null) { throw new IllegalArgumentException("Parameter policyAssignmentId is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.getById(policyAssignmentId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getById(policyAssignmentId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1335,7 +1398,8 @@ private ServiceResponse getByIdDelegate(Response nextPage(String nextPageLink) { } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1375,7 +1440,8 @@ public Observable>> call(String next } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1392,7 +1458,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for the resource group. + * Retrieves all policy assignments that apply to a resource group. + * This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource group and assign the policy definition whose id is {value}. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1446,7 +1514,8 @@ private ServiceResponse> listByResourceGroupNext } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1465,7 +1534,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1486,7 +1556,8 @@ public Observable>> call(String next } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1503,7 +1574,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets policy assignments for a resource. + * Retrieves all policy assignments that apply to a resource. + * This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the resource and assign the policy definition whose id is {value}. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1557,7 +1630,8 @@ private ServiceResponse> listForResourceNextDele } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1576,7 +1650,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1597,7 +1672,8 @@ public Observable>> call(String next } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1614,7 +1690,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy assignments for a subscription. + * Retrieves all policy assignments that apply to a subscription. + * This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes only policy assignments that apply to the subscription and assign the policy definition whose id is {value}. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyClientImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyClientImpl.java index 1bb10c6b512..02944ec28ef 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyClientImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyClientImpl.java @@ -51,6 +51,18 @@ public PolicyClientImpl withSubscriptionId(String subscriptionId) { return this; } + /** The API version to use for the operation. */ + private String apiVersion; + + /** + * Gets The API version to use for the operation. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + /** Gets or sets the preferred language for the response. */ private String acceptLanguage; @@ -134,29 +146,29 @@ public PolicyAssignmentsInner policyAssignments() { } /** - * The PolicySetDefinitionsInner object to access its operations. + * The PolicyDefinitionsInner object to access its operations. */ - private PolicySetDefinitionsInner policySetDefinitions; + private PolicyDefinitionsInner policyDefinitions; /** - * Gets the PolicySetDefinitionsInner object to access its operations. - * @return the PolicySetDefinitionsInner object. + * Gets the PolicyDefinitionsInner object to access its operations. + * @return the PolicyDefinitionsInner object. */ - public PolicySetDefinitionsInner policySetDefinitions() { - return this.policySetDefinitions; + public PolicyDefinitionsInner policyDefinitions() { + return this.policyDefinitions; } /** - * The PolicyDefinitionsInner object to access its operations. + * The PolicySetDefinitionsInner object to access its operations. */ - private PolicyDefinitionsInner policyDefinitions; + private PolicySetDefinitionsInner policySetDefinitions; /** - * Gets the PolicyDefinitionsInner object to access its operations. - * @return the PolicyDefinitionsInner object. + * Gets the PolicySetDefinitionsInner object to access its operations. + * @return the PolicySetDefinitionsInner object. */ - public PolicyDefinitionsInner policyDefinitions() { - return this.policyDefinitions; + public PolicySetDefinitionsInner policySetDefinitions() { + return this.policySetDefinitions; } /** @@ -190,12 +202,13 @@ public PolicyClientImpl(RestClient restClient) { } protected void initialize() { + this.apiVersion = "2018-03-01"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.policyAssignments = new PolicyAssignmentsInner(restClient().retrofit(), this); - this.policySetDefinitions = new PolicySetDefinitionsInner(restClient().retrofit(), this); this.policyDefinitions = new PolicyDefinitionsInner(restClient().retrofit(), this); + this.policySetDefinitions = new PolicySetDefinitionsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } @@ -206,6 +219,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s)", super.userAgent(), "PolicyClient"); + return String.format("%s (%s, %s)", super.userAgent(), "PolicyClient", "2018-03-01"); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionInner.java index e88673d141f..8dc81cd3e09 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionInner.java @@ -76,7 +76,13 @@ public class PolicyDefinitionInner { private String name; /** - * Get the policyType value. + * The type of the resource (Microsoft.Authorization/policyDefinitions). + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'. * * @return the policyType value */ @@ -85,7 +91,7 @@ public PolicyType policyType() { } /** - * Set the policyType value. + * Set the type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'. * * @param policyType the policyType value to set * @return the PolicyDefinitionInner object itself. @@ -96,7 +102,7 @@ public PolicyDefinitionInner withPolicyType(PolicyType policyType) { } /** - * Get the mode value. + * Get the policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'. * * @return the mode value */ @@ -105,7 +111,7 @@ public PolicyMode mode() { } /** - * Set the mode value. + * Set the policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'. * * @param mode the mode value to set * @return the PolicyDefinitionInner object itself. @@ -116,7 +122,7 @@ public PolicyDefinitionInner withMode(PolicyMode mode) { } /** - * Get the displayName value. + * Get the display name of the policy definition. * * @return the displayName value */ @@ -125,7 +131,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the display name of the policy definition. * * @param displayName the displayName value to set * @return the PolicyDefinitionInner object itself. @@ -136,7 +142,7 @@ public PolicyDefinitionInner withDisplayName(String displayName) { } /** - * Get the description value. + * Get the policy definition description. * * @return the description value */ @@ -145,7 +151,7 @@ public String description() { } /** - * Set the description value. + * Set the policy definition description. * * @param description the description value to set * @return the PolicyDefinitionInner object itself. @@ -156,7 +162,7 @@ public PolicyDefinitionInner withDescription(String description) { } /** - * Get the policyRule value. + * Get the policy rule. * * @return the policyRule value */ @@ -165,7 +171,7 @@ public Object policyRule() { } /** - * Set the policyRule value. + * Set the policy rule. * * @param policyRule the policyRule value to set * @return the PolicyDefinitionInner object itself. @@ -176,7 +182,7 @@ public PolicyDefinitionInner withPolicyRule(Object policyRule) { } /** - * Get the metadata value. + * Get the policy definition metadata. * * @return the metadata value */ @@ -185,7 +191,7 @@ public Object metadata() { } /** - * Set the metadata value. + * Set the policy definition metadata. * * @param metadata the metadata value to set * @return the PolicyDefinitionInner object itself. @@ -196,7 +202,7 @@ public PolicyDefinitionInner withMetadata(Object metadata) { } /** - * Get the parameters value. + * Get required if a parameter is used in policy rule. * * @return the parameters value */ @@ -205,7 +211,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set required if a parameter is used in policy rule. * * @param parameters the parameters value to set * @return the PolicyDefinitionInner object itself. @@ -216,7 +222,7 @@ public PolicyDefinitionInner withParameters(Object parameters) { } /** - * Get the id value. + * Get the ID of the policy definition. * * @return the id value */ @@ -225,7 +231,7 @@ public String id() { } /** - * Get the name value. + * Get the name of the policy definition. * * @return the name value */ @@ -233,4 +239,13 @@ public String name() { return this.name; } + /** + * Get the type of the resource (Microsoft.Authorization/policyDefinitions). + * + * @return the type value + */ + public String type() { + return this.type; + } + } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionsInner.java index 4ae9cd0c2dd..33805c12c5d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicyDefinitionsInner.java @@ -116,7 +116,8 @@ interface PolicyDefinitionsService { } /** - * Creates or updates a policy definition. + * Creates or updates a policy definition in a subscription. + * This operation creates or updates a policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. @@ -130,7 +131,8 @@ public PolicyDefinitionInner createOrUpdate(String policyDefinitionName, PolicyD } /** - * Creates or updates a policy definition. + * Creates or updates a policy definition in a subscription. + * This operation creates or updates a policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. @@ -143,7 +145,8 @@ public ServiceFuture createOrUpdateAsync(String policyDef } /** - * Creates or updates a policy definition. + * Creates or updates a policy definition in a subscription. + * This operation creates or updates a policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. @@ -160,7 +163,8 @@ public PolicyDefinitionInner call(ServiceResponse respons } /** - * Creates or updates a policy definition. + * Creates or updates a policy definition in a subscription. + * This operation creates or updates a policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. @@ -177,9 +181,11 @@ public Observable> createOrUpdateWithServ if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2016-12-01"; - return service.createOrUpdate(policyDefinitionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.createOrUpdate(policyDefinitionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -201,7 +207,8 @@ private ServiceResponse createOrUpdateDelegate(Response deleteAsync(String policyDefinitionName, final Servic } /** - * Deletes a policy definition. + * Deletes a policy definition in a subscription. + * This operation deletes the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -241,7 +250,8 @@ public Void call(ServiceResponse response) { } /** - * Deletes a policy definition. + * Deletes a policy definition in a subscription. + * This operation deletes the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -254,8 +264,10 @@ public Observable> deleteWithServiceResponseAsync(String p if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.delete(policyDefinitionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(policyDefinitionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -278,7 +290,8 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * Gets the policy definition. + * Retrieves a policy definition in a subscription. + * This operation retrieves the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -291,7 +304,8 @@ public PolicyDefinitionInner get(String policyDefinitionName) { } /** - * Gets the policy definition. + * Retrieves a policy definition in a subscription. + * This operation retrieves the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -303,7 +317,8 @@ public ServiceFuture getAsync(String policyDefinitionName } /** - * Gets the policy definition. + * Retrieves a policy definition in a subscription. + * This operation retrieves the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -319,7 +334,8 @@ public PolicyDefinitionInner call(ServiceResponse respons } /** - * Gets the policy definition. + * Retrieves a policy definition in a subscription. + * This operation retrieves the policy definition in the given subscription with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -332,8 +348,10 @@ public Observable> getWithServiceResponse if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.get(policyDefinitionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(policyDefinitionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -355,9 +373,10 @@ private ServiceResponse getDelegate(Response getBuiltInAsync(String policyDefinit } /** - * Gets the built in policy definition. + * Retrieves a built-in policy definition. + * This operation retrieves the built-in policy definition with the given name. * - * @param policyDefinitionName The name of the built in policy definition to get. + * @param policyDefinitionName The name of the built-in policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ @@ -396,9 +417,10 @@ public PolicyDefinitionInner call(ServiceResponse respons } /** - * Gets the built in policy definition. + * Retrieves a built-in policy definition. + * This operation retrieves the built-in policy definition with the given name. * - * @param policyDefinitionName The name of the built in policy definition to get. + * @param policyDefinitionName The name of the built-in policy definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ @@ -406,8 +428,10 @@ public Observable> getBuiltInWithServiceR if (policyDefinitionName == null) { throw new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.getBuiltIn(policyDefinitionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBuiltIn(policyDefinitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,7 +453,8 @@ private ServiceResponse getBuiltInDelegate(Response createOrUpdateAtManagementGroupAsync } /** - * Creates or updates a policy definition at management group level. + * Creates or updates a policy definition in a management group. + * This operation creates or updates a policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param managementGroupId The ID of the management group. @@ -476,7 +503,8 @@ public PolicyDefinitionInner call(ServiceResponse respons } /** - * Creates or updates a policy definition at management group level. + * Creates or updates a policy definition in a management group. + * This operation creates or updates a policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to create. * @param managementGroupId The ID of the management group. @@ -494,9 +522,11 @@ public Observable> createOrUpdateAtManage if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2016-12-01"; - return service.createOrUpdateAtManagementGroup(policyDefinitionName, managementGroupId, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.createOrUpdateAtManagementGroup(policyDefinitionName, managementGroupId, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -518,7 +548,8 @@ private ServiceResponse createOrUpdateAtManagementGroupDe } /** - * Deletes a policy definition at management group level. + * Deletes a policy definition in a management group. + * This operation deletes the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. @@ -531,7 +562,8 @@ public void deleteAtManagementGroup(String policyDefinitionName, String manageme } /** - * Deletes a policy definition at management group level. + * Deletes a policy definition in a management group. + * This operation deletes the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. @@ -544,7 +576,8 @@ public ServiceFuture deleteAtManagementGroupAsync(String policyDefinitionN } /** - * Deletes a policy definition at management group level. + * Deletes a policy definition in a management group. + * This operation deletes the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. @@ -561,7 +594,8 @@ public Void call(ServiceResponse response) { } /** - * Deletes a policy definition at management group level. + * Deletes a policy definition in a management group. + * This operation deletes the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to delete. * @param managementGroupId The ID of the management group. @@ -575,8 +609,10 @@ public Observable> deleteAtManagementGroupWithServiceRespo if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.deleteAtManagementGroup(policyDefinitionName, managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteAtManagementGroup(policyDefinitionName, managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -599,7 +635,8 @@ private ServiceResponse deleteAtManagementGroupDelegate(Response getAtManagementGroupAsync(String pol } /** - * Gets the policy definition at management group level. + * Retrieve a policy definition in a management group. + * This operation retrieves the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. @@ -643,7 +682,8 @@ public PolicyDefinitionInner call(ServiceResponse respons } /** - * Gets the policy definition at management group level. + * Retrieve a policy definition in a management group. + * This operation retrieves the policy definition in the given management group with the given name. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. @@ -657,8 +697,10 @@ public Observable> getAtManagementGroupWi if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.getAtManagementGroup(policyDefinitionName, managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAtManagementGroup(policyDefinitionName, managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -680,7 +722,8 @@ private ServiceResponse getAtManagementGroupDelegate(Resp } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server @@ -698,7 +741,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -717,7 +761,8 @@ public Observable>> call(String next } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyDefinitionInner> object @@ -733,7 +778,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyDefinitionInner> object wrapped in {@link ServiceResponse} if successful. @@ -762,8 +809,10 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -785,7 +834,8 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -822,7 +873,8 @@ public Observable>> call(String next } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicyDefinitionInner> object @@ -838,7 +890,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicyDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable>> listBuiltInSinglePageAsync() { - final String apiVersion = "2016-12-01"; - return service.listBuiltIn(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBuiltIn(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -879,7 +935,7 @@ public Observable>> call(Response> listBuiltInDelegate(Response response) throws CloudException, IOException { + private ServiceResponse> listBuiltInDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -887,7 +943,8 @@ private ServiceResponse> listBuiltInDelegate(Res } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -906,7 +963,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param managementGroupId The ID of the management group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -926,7 +984,8 @@ public Observable>> call(String next } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -943,7 +1002,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * ServiceResponse> * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -974,8 +1035,10 @@ public Observable>> listByManagement if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2016-12-01"; - return service.listByManagementGroup(managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByManagementGroup(managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -997,7 +1060,8 @@ private ServiceResponse> listByManagementGroupDe } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1016,7 +1080,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1037,7 +1102,8 @@ public Observable>> call(String next } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1054,7 +1120,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy definitions for a subscription. + * Retrieves policy definitions in a subscription. + * This operation retrieves a list of all the policy definitions in a given subscription. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1108,7 +1176,8 @@ private ServiceResponse> listNextDelegate(Respon } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1127,7 +1196,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1148,7 +1218,8 @@ public Observable>> call(String next } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1165,7 +1236,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the built in policy definitions. + * Retrieve built-in policy definitions. + * This operation retrieves a list of all the built-in policy definitions. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1219,7 +1292,8 @@ private ServiceResponse> listBuiltInNextDelegate } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1238,7 +1312,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1259,7 +1334,8 @@ public Observable>> call(String next } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1276,7 +1352,8 @@ public Page call(ServiceResponse>> call(ServiceResp } /** - * Gets all the policy definitions for a subscription at management group level. + * Retrieve policy definitions in a management group. + * This operation retrieves a list of all the policy definitions in a given management group. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicySetDefinitionInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicySetDefinitionInner.java index 898ce4ccfed..e78e7c24ab6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicySetDefinitionInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/PolicySetDefinitionInner.java @@ -77,7 +77,7 @@ public class PolicySetDefinitionInner { private String type; /** - * Get the policyType value. + * Get the type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'. * * @return the policyType value */ @@ -86,7 +86,7 @@ public PolicyType policyType() { } /** - * Set the policyType value. + * Set the type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom'. * * @param policyType the policyType value to set * @return the PolicySetDefinitionInner object itself. @@ -97,7 +97,7 @@ public PolicySetDefinitionInner withPolicyType(PolicyType policyType) { } /** - * Get the displayName value. + * Get the display name of the policy set definition. * * @return the displayName value */ @@ -106,7 +106,7 @@ public String displayName() { } /** - * Set the displayName value. + * Set the display name of the policy set definition. * * @param displayName the displayName value to set * @return the PolicySetDefinitionInner object itself. @@ -117,7 +117,7 @@ public PolicySetDefinitionInner withDisplayName(String displayName) { } /** - * Get the description value. + * Get the policy set definition description. * * @return the description value */ @@ -126,7 +126,7 @@ public String description() { } /** - * Set the description value. + * Set the policy set definition description. * * @param description the description value to set * @return the PolicySetDefinitionInner object itself. @@ -137,7 +137,7 @@ public PolicySetDefinitionInner withDescription(String description) { } /** - * Get the metadata value. + * Get the policy set definition metadata. * * @return the metadata value */ @@ -146,7 +146,7 @@ public Object metadata() { } /** - * Set the metadata value. + * Set the policy set definition metadata. * * @param metadata the metadata value to set * @return the PolicySetDefinitionInner object itself. @@ -157,7 +157,7 @@ public PolicySetDefinitionInner withMetadata(Object metadata) { } /** - * Get the parameters value. + * Get the policy set definition parameters that can be used in policy definition references. * * @return the parameters value */ @@ -166,7 +166,7 @@ public Object parameters() { } /** - * Set the parameters value. + * Set the policy set definition parameters that can be used in policy definition references. * * @param parameters the parameters value to set * @return the PolicySetDefinitionInner object itself. @@ -177,7 +177,7 @@ public PolicySetDefinitionInner withParameters(Object parameters) { } /** - * Get the policyDefinitions value. + * Get an array of policy definition references. * * @return the policyDefinitions value */ @@ -186,7 +186,7 @@ public List policyDefinitions() { } /** - * Set the policyDefinitions value. + * Set an array of policy definition references. * * @param policyDefinitions the policyDefinitions value to set * @return the PolicySetDefinitionInner object itself. @@ -197,7 +197,7 @@ public PolicySetDefinitionInner withPolicyDefinitions(List createOrUpdateAsync(String policy /** * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. @@ -161,6 +164,7 @@ public PolicySetDefinitionInner call(ServiceResponse r /** * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param parameters The policy set definition properties. @@ -177,9 +181,11 @@ public Observable> createOrUpdateWithS if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2017-06-01-preview"; - return service.createOrUpdate(policySetDefinitionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.createOrUpdate(policySetDefinitionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -203,6 +209,7 @@ private ServiceResponse createOrUpdateDelegate(Respons /** * Deletes a policy set definition. + * This operation deletes the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -215,6 +222,7 @@ public void delete(String policySetDefinitionName) { /** * Deletes a policy set definition. + * This operation deletes the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -227,6 +235,7 @@ public ServiceFuture deleteAsync(String policySetDefinitionName, final Ser /** * Deletes a policy set definition. + * This operation deletes the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -243,6 +252,7 @@ public Void call(ServiceResponse response) { /** * Deletes a policy set definition. + * This operation deletes the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -255,8 +265,10 @@ public Observable> deleteWithServiceResponseAsync(String p if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.delete(policySetDefinitionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(policySetDefinitionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -279,7 +291,8 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * Gets the policy set definition. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -292,7 +305,8 @@ public PolicySetDefinitionInner get(String policySetDefinitionName) { } /** - * Gets the policy set definition. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -304,7 +318,8 @@ public ServiceFuture getAsync(String policySetDefiniti } /** - * Gets the policy set definition. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -320,7 +335,8 @@ public PolicySetDefinitionInner call(ServiceResponse r } /** - * Gets the policy set definition. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given subscription with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -333,8 +349,10 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.get(policySetDefinitionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(policySetDefinitionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -356,7 +374,8 @@ private ServiceResponse getDelegate(Response getBuiltInAsync(String policySetD } /** - * Gets the built in policy set definition. + * Retrieves a built in policy set definition. + * This operation retrieves the built-in policy set definition with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -397,7 +418,8 @@ public PolicySetDefinitionInner call(ServiceResponse r } /** - * Gets the built in policy set definition. + * Retrieves a built in policy set definition. + * This operation retrieves the built-in policy set definition with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -407,8 +429,10 @@ public Observable> getBuiltInWithServi if (policySetDefinitionName == null) { throw new IllegalArgumentException("Parameter policySetDefinitionName is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.getBuiltIn(policySetDefinitionName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getBuiltIn(policySetDefinitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -430,7 +454,8 @@ private ServiceResponse getBuiltInDelegate(Response nextPage(String nextPageLink) { } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -467,7 +493,8 @@ public Observable>> call(String n } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicySetDefinitionInner> object @@ -483,7 +510,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicySetDefinitionInner> object wrapped in {@link ServiceResponse} if successful. @@ -512,8 +541,10 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -535,7 +566,8 @@ private ServiceResponse> listDelegate(Respons } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -553,7 +585,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -572,7 +605,8 @@ public Observable>> call(String n } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<PolicySetDefinitionInner> object @@ -588,7 +622,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<PolicySetDefinitionInner> object wrapped in {@link ServiceResponse} if successful. */ public Observable>> listBuiltInSinglePageAsync() { - final String apiVersion = "2017-06-01-preview"; - return service.listBuiltIn(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBuiltIn(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -629,7 +667,7 @@ public Observable>> call(Response }); } - private ServiceResponse> listBuiltInDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listBuiltInDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -637,7 +675,8 @@ private ServiceResponse> listBuiltInDelegate( } /** - * Creates or updates a policy set definition at management group level. + * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param managementGroupId The ID of the management group. @@ -652,7 +691,8 @@ public PolicySetDefinitionInner createOrUpdateAtManagementGroup(String policySet } /** - * Creates or updates a policy set definition at management group level. + * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param managementGroupId The ID of the management group. @@ -666,7 +706,8 @@ public ServiceFuture createOrUpdateAtManagementGroupAs } /** - * Creates or updates a policy set definition at management group level. + * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param managementGroupId The ID of the management group. @@ -684,7 +725,8 @@ public PolicySetDefinitionInner call(ServiceResponse r } /** - * Creates or updates a policy set definition at management group level. + * Creates or updates a policy set definition. + * This operation creates or updates a policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param managementGroupId The ID of the management group. @@ -702,9 +744,11 @@ public Observable> createOrUpdateAtMan if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } Validator.validate(parameters); - final String apiVersion = "2017-06-01-preview"; - return service.createOrUpdateAtManagementGroup(policySetDefinitionName, managementGroupId, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.createOrUpdateAtManagementGroup(policySetDefinitionName, managementGroupId, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -727,7 +771,8 @@ private ServiceResponse createOrUpdateAtManagementGrou } /** - * Deletes a policy set definition at management group level. + * Deletes a policy set definition. + * This operation deletes the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. @@ -740,7 +785,8 @@ public void deleteAtManagementGroup(String policySetDefinitionName, String manag } /** - * Deletes a policy set definition at management group level. + * Deletes a policy set definition. + * This operation deletes the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. @@ -753,7 +799,8 @@ public ServiceFuture deleteAtManagementGroupAsync(String policySetDefiniti } /** - * Deletes a policy set definition at management group level. + * Deletes a policy set definition. + * This operation deletes the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. @@ -770,7 +817,8 @@ public Void call(ServiceResponse response) { } /** - * Deletes a policy set definition at management group level. + * Deletes a policy set definition. + * This operation deletes the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to delete. * @param managementGroupId The ID of the management group. @@ -784,8 +832,10 @@ public Observable> deleteAtManagementGroupWithServiceRespo if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.deleteAtManagementGroup(policySetDefinitionName, managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.deleteAtManagementGroup(policySetDefinitionName, managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -808,7 +858,8 @@ private ServiceResponse deleteAtManagementGroupDelegate(Response getAtManagementGroupAsync(String } /** - * Gets the policy set definition at management group level. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @param managementGroupId The ID of the management group. @@ -852,7 +905,8 @@ public PolicySetDefinitionInner call(ServiceResponse r } /** - * Gets the policy set definition at management group level. + * Retrieves a policy set definition. + * This operation retrieves the policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to get. * @param managementGroupId The ID of the management group. @@ -866,8 +920,10 @@ public Observable> getAtManagementGrou if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.getAtManagementGroup(policySetDefinitionName, managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.getAtManagementGroup(policySetDefinitionName, managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -889,7 +945,8 @@ private ServiceResponse getAtManagementGroupDelegate(R } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -908,7 +965,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param managementGroupId The ID of the management group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -928,7 +986,8 @@ public Observable>> call(String n } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -945,7 +1004,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * ServiceResponse> * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -976,8 +1037,10 @@ public Observable>> listByManagem if (managementGroupId == null) { throw new IllegalArgumentException("Parameter managementGroupId is required and cannot be null."); } - final String apiVersion = "2017-06-01-preview"; - return service.listByManagementGroup(managementGroupId, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByManagementGroup(managementGroupId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -999,7 +1062,8 @@ private ServiceResponse> listByManagementGrou } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1018,7 +1082,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1039,7 +1104,8 @@ public Observable>> call(String n } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1056,7 +1122,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the policy set definitions for a subscription. + * Retrieves the policy set definitions for a subscription. + * This operation retrieves a list of all the policy set definitions in the given subscription. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1110,7 +1178,8 @@ private ServiceResponse> listNextDelegate(Res } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1129,7 +1198,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1150,7 +1220,8 @@ public Observable>> call(String n } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1167,7 +1238,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the built in policy set definitions. + * Retrieves built-in policy set definitions. + * This operation retrieves a list of all the built-in policy set definitions. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1221,7 +1294,8 @@ private ServiceResponse> listBuiltInNextDeleg } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1240,7 +1314,8 @@ public Page nextPage(String nextPageLink) { } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -1261,7 +1336,8 @@ public Observable>> call(String n } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1278,7 +1354,8 @@ public Page call(ServiceResponse>> call(ServiceR } /** - * Gets all the policy set definitions for a subscription at management group. + * Retrieves all policy set definitions in management group. + * This operation retrieves a list of all the a policy set definition in the given management group. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProviderInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProviderInner.java index 81f6da2cac9..85f1e9034d7 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProviderInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProviderInner.java @@ -41,7 +41,7 @@ public class ProviderInner { private List resourceTypes; /** - * Get the id value. + * Get the provider ID. * * @return the id value */ @@ -50,7 +50,7 @@ public String id() { } /** - * Get the namespace value. + * Get the namespace of the resource provider. * * @return the namespace value */ @@ -59,7 +59,7 @@ public String namespace() { } /** - * Set the namespace value. + * Set the namespace of the resource provider. * * @param namespace the namespace value to set * @return the ProviderInner object itself. @@ -70,7 +70,7 @@ public ProviderInner withNamespace(String namespace) { } /** - * Get the registrationState value. + * Get the registration state of the provider. * * @return the registrationState value */ @@ -79,7 +79,7 @@ public String registrationState() { } /** - * Get the resourceTypes value. + * Get the collection of provider resource types. * * @return the resourceTypes value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupExportResultInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupExportResultInner.java index e57ed546b93..264161d97cc 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupExportResultInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupExportResultInner.java @@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Resource group export result. + * The ResourceGroupExportResultInner model. */ public class ResourceGroupExportResultInner { /** @@ -28,7 +28,7 @@ public class ResourceGroupExportResultInner { private ResourceManagementErrorWithDetails error; /** - * Get the template value. + * Get the template content. * * @return the template value */ @@ -37,7 +37,7 @@ public Object template() { } /** - * Set the template value. + * Set the template content. * * @param template the template value to set * @return the ResourceGroupExportResultInner object itself. @@ -48,7 +48,7 @@ public ResourceGroupExportResultInner withTemplate(Object template) { } /** - * Get the error value. + * Get the error. * * @return the error value */ @@ -57,7 +57,7 @@ public ResourceManagementErrorWithDetails error() { } /** - * Set the error value. + * Set the error. * * @param error the error value to set * @return the ResourceGroupExportResultInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupInner.java index 159d46ede1c..830f21df781 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupInner.java @@ -36,7 +36,7 @@ public class ResourceGroupInner { /** * The location of the resource group. It cannot be changed after the - * resource group has been created. It must be one of the supported Azure + * resource group has been created. It muct be one of the supported Azure * locations. */ @JsonProperty(value = "location", required = true) @@ -55,7 +55,7 @@ public class ResourceGroupInner { private Map tags; /** - * Get the id value. + * Get the ID of the resource group. * * @return the id value */ @@ -64,7 +64,7 @@ public String id() { } /** - * Get the name value. + * Get the name of the resource group. * * @return the name value */ @@ -73,7 +73,7 @@ public String name() { } /** - * Set the name value. + * Set the name of the resource group. * * @param name the name value to set * @return the ResourceGroupInner object itself. @@ -104,7 +104,7 @@ public ResourceGroupInner withProperties(ResourceGroupProperties properties) { } /** - * Get the location value. + * Get the location of the resource group. It cannot be changed after the resource group has been created. It muct be one of the supported Azure locations. * * @return the location value */ @@ -113,7 +113,7 @@ public String location() { } /** - * Set the location value. + * Set the location of the resource group. It cannot be changed after the resource group has been created. It muct be one of the supported Azure locations. * * @param location the location value to set * @return the ResourceGroupInner object itself. @@ -124,7 +124,7 @@ public ResourceGroupInner withLocation(String location) { } /** - * Get the managedBy value. + * Get the ID of the resource that manages this resource group. * * @return the managedBy value */ @@ -133,7 +133,7 @@ public String managedBy() { } /** - * Set the managedBy value. + * Set the ID of the resource that manages this resource group. * * @param managedBy the managedBy value to set * @return the ResourceGroupInner object itself. @@ -144,7 +144,7 @@ public ResourceGroupInner withManagedBy(String managedBy) { } /** - * Get the tags value. + * Get the tags attached to the resource group. * * @return the tags value */ @@ -153,7 +153,7 @@ public Map tags() { } /** - * Set the tags value. + * Set the tags attached to the resource group. * * @param tags the tags value to set * @return the ResourceGroupInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java index 33286a2a37e..fda4dd6261b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.resources.ExportTemplateRequest; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -64,6 +65,10 @@ public ResourceGroupsInner(Retrofit retrofit, ResourceManagementClientImpl clien * used by Retrofit to perform actually REST calls. */ interface ResourceGroupsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$expand") String expand, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups checkExistence" }) @HEAD("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") Observable> checkExistence(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -84,24 +89,269 @@ interface ResourceGroupsService { @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups update" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups patch" }) @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourceGroupPatchableInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourceGroupInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups exportTemplate" }) @POST("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate") - Observable> exportTemplate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ExportTemplateRequestInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> exportTemplate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ExportTemplateRequest parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups list" }) @GET("subscriptions/{subscriptionId}/resourcegroups") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.ResourceGroups listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GenericResourceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String filter = null; + final String expand = null; + final Integer top = null; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @param filter The filter to apply on the operation. + * @param expand The $expand query parameter + * @param top The number of results to return. If null is passed, returns all resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<GenericResourceInner> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final String expand, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @param filter The filter to apply on the operation. + * @param expand The $expand query parameter + * @param top The number of results to return. If null is passed, returns all resources. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @param filter The filter to apply on the operation. + * @param expand The $expand query parameter + * @param top The number of results to return. If null is passed, returns all resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, expand, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all the resources for a resource group. + * + * @param resourceGroupName The resource group with the resources to get. + * @param filter The filter to apply on the operation. + * @param expand The $expand query parameter + * @param top The number of results to return. If null is passed, returns all resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + return listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all the resources for a resource group. + * + ServiceResponse> * @param resourceGroupName The resource group with the resources to get. + ServiceResponse> * @param filter The filter to apply on the operation. + ServiceResponse> * @param expand The $expand query parameter + ServiceResponse> * @param top The number of results to return. If null is passed, returns all resources. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Checks whether a resource group exists. * @@ -183,7 +433,7 @@ private ServiceResponse checkExistenceDelegate(Response response) } /** - * Creates or updates a resource group. + * Creates a resource group. * * @param resourceGroupName The name of the resource group to create or update. * @param parameters Parameters supplied to the create or update a resource group. @@ -197,7 +447,7 @@ public ResourceGroupInner createOrUpdate(String resourceGroupName, ResourceGroup } /** - * Creates or updates a resource group. + * Creates a resource group. * * @param resourceGroupName The name of the resource group to create or update. * @param parameters Parameters supplied to the create or update a resource group. @@ -210,7 +460,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGrou } /** - * Creates or updates a resource group. + * Creates a resource group. * * @param resourceGroupName The name of the resource group to create or update. * @param parameters Parameters supplied to the create or update a resource group. @@ -227,7 +477,7 @@ public ResourceGroupInner call(ServiceResponse response) { } /** - * Creates or updates a resource group. + * Creates a resource group. * * @param resourceGroupName The name of the resource group to create or update. * @param parameters Parameters supplied to the create or update a resource group. @@ -508,8 +758,8 @@ private ServiceResponse getDelegate(Response r * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ResourceGroupInner object if successful. */ - public ResourceGroupInner update(String resourceGroupName, ResourceGroupPatchableInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, parameters).toBlocking().single().body(); + public ResourceGroupInner patch(String resourceGroupName, ResourceGroupInner parameters) { + return patchWithServiceResponseAsync(resourceGroupName, parameters).toBlocking().single().body(); } /** @@ -522,8 +772,8 @@ public ResourceGroupInner update(String resourceGroupName, ResourceGroupPatchabl * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String resourceGroupName, ResourceGroupPatchableInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, parameters), serviceCallback); + public ServiceFuture patchAsync(String resourceGroupName, ResourceGroupInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, parameters), serviceCallback); } /** @@ -535,8 +785,8 @@ public ServiceFuture updateAsync(String resourceGroupName, R * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ResourceGroupInner object */ - public Observable updateAsync(String resourceGroupName, ResourceGroupPatchableInner parameters) { - return updateWithServiceResponseAsync(resourceGroupName, parameters).map(new Func1, ResourceGroupInner>() { + public Observable patchAsync(String resourceGroupName, ResourceGroupInner parameters) { + return patchWithServiceResponseAsync(resourceGroupName, parameters).map(new Func1, ResourceGroupInner>() { @Override public ResourceGroupInner call(ServiceResponse response) { return response.body(); @@ -553,7 +803,7 @@ public ResourceGroupInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ResourceGroupInner object */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, ResourceGroupPatchableInner parameters) { + public Observable> patchWithServiceResponseAsync(String resourceGroupName, ResourceGroupInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -567,12 +817,12 @@ public Observable> updateWithServiceResponse throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - return service.update(resourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.patch(resourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateDelegate(response); + ServiceResponse clientResponse = patchDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -581,7 +831,7 @@ public Observable> call(Response updateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -598,7 +848,7 @@ private ServiceResponse updateDelegate(Response exportTemplateAsync(String resourceGroupName, ExportTemplateRequestInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture exportTemplateAsync(String resourceGroupName, ExportTemplateRequest parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(exportTemplateWithServiceResponseAsync(resourceGroupName, parameters), serviceCallback); } @@ -623,7 +873,7 @@ public ServiceFuture exportTemplateAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ResourceGroupExportResultInner object */ - public Observable exportTemplateAsync(String resourceGroupName, ExportTemplateRequestInner parameters) { + public Observable exportTemplateAsync(String resourceGroupName, ExportTemplateRequest parameters) { return exportTemplateWithServiceResponseAsync(resourceGroupName, parameters).map(new Func1, ResourceGroupExportResultInner>() { @Override public ResourceGroupExportResultInner call(ServiceResponse response) { @@ -640,7 +890,7 @@ public ResourceGroupExportResultInner call(ServiceResponse> exportTemplateWithServiceResponseAsync(String resourceGroupName, ExportTemplateRequestInner parameters) { + public Observable> exportTemplateWithServiceResponseAsync(String resourceGroupName, ExportTemplateRequest parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -894,6 +1144,117 @@ private ServiceResponse> listDelegate(Response listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get all the resources for a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get all the resources for a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all the resources for a resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<GenericResourceInner> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get all the resources for a resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets all the resource groups for a subscription. * diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManagementClientImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManagementClientImpl.java index 878acd67afe..f49974af9f4 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManagementClientImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceManagementClientImpl.java @@ -159,29 +159,29 @@ public ProvidersInner providers() { } /** - * The ResourcesInner object to access its operations. + * The ResourceGroupsInner object to access its operations. */ - private ResourcesInner resources; + private ResourceGroupsInner resourceGroups; /** - * Gets the ResourcesInner object to access its operations. - * @return the ResourcesInner object. + * Gets the ResourceGroupsInner object to access its operations. + * @return the ResourceGroupsInner object. */ - public ResourcesInner resources() { - return this.resources; + public ResourceGroupsInner resourceGroups() { + return this.resourceGroups; } /** - * The ResourceGroupsInner object to access its operations. + * The ResourcesInner object to access its operations. */ - private ResourceGroupsInner resourceGroups; + private ResourcesInner resources; /** - * Gets the ResourceGroupsInner object to access its operations. - * @return the ResourceGroupsInner object. + * Gets the ResourcesInner object to access its operations. + * @return the ResourcesInner object. */ - public ResourceGroupsInner resourceGroups() { - return this.resourceGroups; + public ResourcesInner resources() { + return this.resources; } /** @@ -241,14 +241,14 @@ public ResourceManagementClientImpl(RestClient restClient) { } protected void initialize() { - this.apiVersion = "2017-05-10"; + this.apiVersion = "2016-09-01"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.deployments = new DeploymentsInner(restClient().retrofit(), this); this.providers = new ProvidersInner(restClient().retrofit(), this); - this.resources = new ResourcesInner(restClient().retrofit(), this); this.resourceGroups = new ResourceGroupsInner(restClient().retrofit(), this); + this.resources = new ResourcesInner(restClient().retrofit(), this); this.tags = new TagsInner(restClient().retrofit(), this); this.deploymentOperations = new DeploymentOperationsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); @@ -261,6 +261,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "ResourceManagementClient", "2017-05-10"); + return String.format("%s (%s, %s)", super.userAgent(), "ResourceManagementClient", "2016-09-01"); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java index 8c9fec5665e..b5cbf0a6e80 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java @@ -8,12 +8,12 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.resources.ResourcesMoveInfo; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -43,7 +43,7 @@ * An instance of this class provides access to all the operations defined * in Resources. */ -public class ResourcesInner implements InnerSupportsListing { +public class ResourcesInner { /** The Retrofit service to perform REST calls. */ private ResourcesService service; /** The service client containing this operation class. */ @@ -65,25 +65,13 @@ public ResourcesInner(Retrofit retrofit, ResourceManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface ResourcesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$expand") String expand, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources moveResources" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources") - Observable> moveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfoInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> moveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfo parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources beginMoveResources" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources") - Observable> beginMoveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfoInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources validateMoveResources" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources") - Observable> validateMoveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfoInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources beginValidateMoveResources" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources") - Observable> beginValidateMoveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfoInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> beginMoveResources(@Path("sourceResourceGroupName") String sourceResourceGroupName, @Path("subscriptionId") String subscriptionId, @Body ResourcesMoveInfo parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources list" }) @GET("subscriptions/{subscriptionId}/resources") @@ -153,268 +141,23 @@ interface ResourcesService { @GET("{resourceId}") Observable> getById(@Path(value = "resourceId", encoded = true) String resourceId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resources.Resources listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GenericResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - final String expand = null; - final Integer top = null; - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter - * @param top The number of results to return. If null is passed, returns all resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the PagedList<GenericResourceInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final String expand, final Integer top) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter - * @param top The number of results to return. If null is passed, returns all resources. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter - * @param top The number of results to return. If null is passed, returns all resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, expand, top) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the resources for a resource group. - * - * @param resourceGroupName The resource group with the resources to get. - * @param filter The filter to apply on the operation. - * @param expand The $expand query parameter - * @param top The number of results to return. If null is passed, returns all resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { - return listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, top) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the resources for a resource group. - * - ServiceResponse> * @param resourceGroupName The resource group with the resources to get. - ServiceResponse> * @param filter The filter to apply on the operation. - ServiceResponse> * @param expand The $expand query parameter - ServiceResponse> * @param top The number of results to return. If null is passed, returns all resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final String expand, final Integer top) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), filter, expand, top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void moveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public void moveResources(String sourceResourceGroupName, ResourcesMoveInfo parameters) { moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().last().body(); } @@ -422,13 +165,13 @@ public void moveResources(String sourceResourceGroupName, ResourcesMoveInfoInner * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture moveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture moveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters), serviceCallback); } @@ -436,12 +179,12 @@ public ServiceFuture moveResourcesAsync(String sourceResourceGroupName, Re * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable moveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public Observable moveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters) { return moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { @@ -454,12 +197,12 @@ public Void call(ServiceResponse response) { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> moveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public Observable> moveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters) { if (sourceResourceGroupName == null) { throw new IllegalArgumentException("Parameter sourceResourceGroupName is required and cannot be null."); } @@ -481,13 +224,13 @@ public Observable> moveResourcesWithServiceResponseAsync(S * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfo parameters) { beginMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().single().body(); } @@ -495,13 +238,13 @@ public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfo * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture beginMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(beginMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters), serviceCallback); } @@ -509,12 +252,12 @@ public ServiceFuture beginMoveResourcesAsync(String sourceResourceGroupNam * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable beginMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public Observable beginMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters) { return beginMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { @@ -527,12 +270,12 @@ public Void call(ServiceResponse response) { * Moves resources from one resource group to another resource group. * The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and delete operations are blocked on the groups until the move completes. * - * @param sourceResourceGroupName The name of the resource group containing the resources to move. + * @param sourceResourceGroupName The name of the resource group containing the rsources to move. * @param parameters Parameters for moving resources. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> beginMoveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { + public Observable> beginMoveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfo parameters) { if (sourceResourceGroupName == null) { throw new IllegalArgumentException("Parameter sourceResourceGroupName is required and cannot be null."); } @@ -568,171 +311,6 @@ private ServiceResponse beginMoveResourcesDelegate(Response .build(response); } - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void validateMoveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - validateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().last().body(); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture validateMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(validateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters), serviceCallback); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable validateMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - return validateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> validateMoveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - if (sourceResourceGroupName == null) { - throw new IllegalArgumentException("Parameter sourceResourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.validateMoveResources(sourceResourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginValidateMoveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - beginValidateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().single().body(); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture beginValidateMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginValidateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters), serviceCallback); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginValidateMoveResourcesAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - return beginValidateMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Validates whether resources can be moved from one resource group to another resource group. - * This operation checks whether the specified resources can be moved to the target. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to check the result of the long-running operation. - * - * @param sourceResourceGroupName The name of the resource group containing the resources to validate for move. - * @param parameters Parameters for moving resources. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginValidateMoveResourcesWithServiceResponseAsync(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { - if (sourceResourceGroupName == null) { - throw new IllegalArgumentException("Parameter sourceResourceGroupName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginValidateMoveResources(sourceResourceGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginValidateMoveResourcesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginValidateMoveResourcesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .register(409, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Get all the resources in a subscription. * @@ -2456,117 +2034,6 @@ private ServiceResponse getByIdDelegate(Response listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get all the resources for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get all the resources for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all the resources for a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<GenericResourceInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get all the resources for a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<GenericResourceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Get all the resources in a subscription. * diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionInner.java index a955dd07556..9c0fa3274fc 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionInner.java @@ -58,7 +58,7 @@ public class SubscriptionInner { private String authorizationSource; /** - * Get the id value. + * Get the fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000. * * @return the id value */ @@ -67,7 +67,7 @@ public String id() { } /** - * Get the subscriptionId value. + * Get the subscription ID. * * @return the subscriptionId value */ @@ -76,7 +76,7 @@ public String subscriptionId() { } /** - * Get the displayName value. + * Get the subscription display name. * * @return the displayName value */ @@ -85,7 +85,7 @@ public String displayName() { } /** - * Get the state value. + * Get the subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. Possible values include: 'Enabled', 'Warned', 'PastDue', 'Disabled', 'Deleted'. * * @return the state value */ @@ -94,7 +94,7 @@ public SubscriptionState state() { } /** - * Get the subscriptionPolicies value. + * Get the subscription policies. * * @return the subscriptionPolicies value */ @@ -103,7 +103,7 @@ public SubscriptionPolicies subscriptionPolicies() { } /** - * Set the subscriptionPolicies value. + * Set the subscription policies. * * @param subscriptionPolicies the subscriptionPolicies value to set * @return the SubscriptionInner object itself. @@ -114,7 +114,7 @@ public SubscriptionInner withSubscriptionPolicies(SubscriptionPolicies subscript } /** - * Get the authorizationSource value. + * Get the authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. * * @return the authorizationSource value */ @@ -123,7 +123,7 @@ public String authorizationSource() { } /** - * Set the authorizationSource value. + * Set the authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. * * @param authorizationSource the authorizationSource value to set * @return the SubscriptionInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java index 27d253e39c0..804786a548c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java @@ -140,7 +140,11 @@ public Observable>> listLocationsWithService public Observable>> call(Response response) { try { ServiceResponse> result = listLocationsDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagDetailsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagDetailsInner.java index 5f015d0b217..d9b93099eba 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagDetailsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagDetailsInner.java @@ -19,7 +19,7 @@ public class TagDetailsInner { /** * The tag ID. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** @@ -42,7 +42,7 @@ public class TagDetailsInner { private List values; /** - * Get the id value. + * Get the tag ID. * * @return the id value */ @@ -51,18 +51,7 @@ public String id() { } /** - * Set the id value. - * - * @param id the id value to set - * @return the TagDetailsInner object itself. - */ - public TagDetailsInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the tagName value. + * Get the tag name. * * @return the tagName value */ @@ -71,7 +60,7 @@ public String tagName() { } /** - * Set the tagName value. + * Set the tag name. * * @param tagName the tagName value to set * @return the TagDetailsInner object itself. @@ -82,7 +71,7 @@ public TagDetailsInner withTagName(String tagName) { } /** - * Get the count value. + * Get the total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0. * * @return the count value */ @@ -91,7 +80,7 @@ public TagCount count() { } /** - * Set the count value. + * Set the total number of resources that use the resource tag. When a tag is initially created and has no associated resources, the value is 0. * * @param count the count value to set * @return the TagDetailsInner object itself. @@ -102,7 +91,7 @@ public TagDetailsInner withCount(TagCount count) { } /** - * Get the values value. + * Get the list of tag values. * * @return the values value */ @@ -111,7 +100,7 @@ public List values() { } /** - * Set the values value. + * Set the list of tag values. * * @param values the values value to set * @return the TagDetailsInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagValueInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagValueInner.java index 9117c6dd722..c71bc8d16cc 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagValueInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagValueInner.java @@ -18,7 +18,7 @@ public class TagValueInner { /** * The tag ID. */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** @@ -34,7 +34,7 @@ public class TagValueInner { private TagCount count; /** - * Get the id value. + * Get the tag ID. * * @return the id value */ @@ -43,18 +43,7 @@ public String id() { } /** - * Set the id value. - * - * @param id the id value to set - * @return the TagValueInner object itself. - */ - public TagValueInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the tagValue value. + * Get the tag value. * * @return the tagValue value */ @@ -63,7 +52,7 @@ public String tagValue() { } /** - * Set the tagValue value. + * Set the tag value. * * @param tagValue the tagValue value to set * @return the TagValueInner object itself. @@ -74,7 +63,7 @@ public TagValueInner withTagValue(String tagValue) { } /** - * Get the count value. + * Get the tag value count. * * @return the count value */ @@ -83,7 +72,7 @@ public TagCount count() { } /** - * Set the count value. + * Set the tag value count. * * @param count the count value to set * @return the TagValueInner object itself. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantIdDescriptionInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantIdDescriptionInner.java index 9aa9f4241db..6a2be5193cc 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantIdDescriptionInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantIdDescriptionInner.java @@ -28,7 +28,7 @@ public class TenantIdDescriptionInner { private String tenantId; /** - * Get the id value. + * Get the fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000. * * @return the id value */ @@ -37,7 +37,7 @@ public String id() { } /** - * Get the tenantId value. + * Get the tenant ID. For example, 00000000-0000-0000-0000-000000000000. * * @return the tenantId value */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/package-info.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/package-info.java index 6841e4852bb..d053f24a04d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/package-info.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the implementation classes for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * This package contains the implementation classes for SubscriptionClient. + * All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization. */ package com.microsoft.azure.management.resources.implementation; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/package-info.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/package-info.java index 35103a8481c..43f858c49df 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/package-info.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the classes for ResourceManagementClient. - * Provides operations for working with resources and resource groups. + * This package contains the classes for SubscriptionClient. + * All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization. */ package com.microsoft.azure.management.resources;