diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/CloudEndpointCreateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/CloudEndpointCreateParameters.java index 185e3b960efa..ba900106002a 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/CloudEndpointCreateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/CloudEndpointCreateParameters.java @@ -8,35 +8,15 @@ package com.microsoft.azure.management.storagesync; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; /** - * The parameters used when creating a storage sync service. + * The parameters used when creating a cloud endpoint. */ @JsonFlatten -public class CloudEndpointCreateParameters { - /** - * Required. Gets or sets the location of the resource. This will be one of - * the supported and registered Azure Geo Regions (e.g. West US, East US, - * Southeast Asia, etc.). The geo region of a resource cannot be changed - * once it is created, but if an identical geo region is specified on - * update, the request will succeed. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used for viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key with a length no greater than 128 characters and a value - * with a length no greater than 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - +public class CloudEndpointCreateParameters extends ProxyResource { /** * Storage Account Resource Id. */ @@ -55,46 +35,6 @@ public class CloudEndpointCreateParameters { @JsonProperty(value = "properties.storageAccountTenantId") private String storageAccountTenantId; - /** - * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @param location the location value to set - * @return the CloudEndpointCreateParameters object itself. - */ - public CloudEndpointCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @param tags the tags value to set - * @return the CloudEndpointCreateParameters object itself. - */ - public CloudEndpointCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get storage Account Resource Id. * diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServerCreateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServerCreateParameters.java index 88de075ab2f7..69728cb20422 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServerCreateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServerCreateParameters.java @@ -8,35 +8,15 @@ package com.microsoft.azure.management.storagesync; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; /** - * The parameters used when creating a storage sync service. + * The parameters used when creating a registered server. */ @JsonFlatten -public class RegisteredServerCreateParameters { - /** - * Required. Gets or sets the location of the resource. This will be one of - * the supported and registered Azure Geo Regions (e.g. West US, East US, - * Southeast Asia, etc.). The geo region of a resource cannot be changed - * once it is created, but if an identical geo region is specified on - * update, the request will succeed. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used for viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key with a length no greater than 128 characters and a value - * with a length no greater than 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - +public class RegisteredServerCreateParameters extends ProxyResource { /** * Registered Server Certificate. */ @@ -91,46 +71,6 @@ public class RegisteredServerCreateParameters { @JsonProperty(value = "properties.friendlyName") private String friendlyName; - /** - * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @param location the location value to set - * @return the RegisteredServerCreateParameters object itself. - */ - public RegisteredServerCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @param tags the tags value to set - * @return the RegisteredServerCreateParameters object itself. - */ - public RegisteredServerCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get registered Server Certificate. * diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServersTriggerRolloverHeaders.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServersTriggerRolloverHeaders.java new file mode 100644 index 000000000000..ae1c5f330ebf --- /dev/null +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/RegisteredServersTriggerRolloverHeaders.java @@ -0,0 +1,95 @@ +/** + * 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.storagesync; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for triggerRollover operation. + */ +public class RegisteredServersTriggerRolloverHeaders { + /** + * request id. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /** + * correlation request id. + */ + @JsonProperty(value = "x-ms-correlation-request-id") + private String xMsCorrelationRequestId; + + /** + * Operation Status Location URI. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get request id. + * + * @return the xMsRequestId value + */ + public String xMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set request id. + * + * @param xMsRequestId the xMsRequestId value to set + * @return the RegisteredServersTriggerRolloverHeaders object itself. + */ + public RegisteredServersTriggerRolloverHeaders withXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get correlation request id. + * + * @return the xMsCorrelationRequestId value + */ + public String xMsCorrelationRequestId() { + return this.xMsCorrelationRequestId; + } + + /** + * Set correlation request id. + * + * @param xMsCorrelationRequestId the xMsCorrelationRequestId value to set + * @return the RegisteredServersTriggerRolloverHeaders object itself. + */ + public RegisteredServersTriggerRolloverHeaders withXMsCorrelationRequestId(String xMsCorrelationRequestId) { + this.xMsCorrelationRequestId = xMsCorrelationRequestId; + return this; + } + + /** + * Get operation Status Location URI. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set operation Status Location URI. + * + * @param location the location value to set + * @return the RegisteredServersTriggerRolloverHeaders object itself. + */ + public RegisteredServersTriggerRolloverHeaders withLocation(String location) { + this.location = location; + return this; + } + +} diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointCreateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointCreateParameters.java index c015eb5150a0..e911320fa69d 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointCreateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointCreateParameters.java @@ -8,35 +8,15 @@ package com.microsoft.azure.management.storagesync; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; /** - * The parameters used when creating a storage sync service. + * The parameters used when creating a server endpoint. */ @JsonFlatten -public class ServerEndpointCreateParameters { - /** - * Required. Gets or sets the location of the resource. This will be one of - * the supported and registered Azure Geo Regions (e.g. West US, East US, - * Southeast Asia, etc.). The geo region of a resource cannot be changed - * once it is created, but if an identical geo region is specified on - * update, the request will succeed. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used for viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key with a length no greater than 128 characters and a value - * with a length no greater than 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - +public class ServerEndpointCreateParameters extends ProxyResource { /** * Server Local path. */ @@ -55,6 +35,12 @@ public class ServerEndpointCreateParameters { @JsonProperty(value = "properties.volumeFreeSpacePercent") private Integer volumeFreeSpacePercent; + /** + * Tier files older than days. + */ + @JsonProperty(value = "properties.tierFilesOlderThanDays") + private Integer tierFilesOlderThanDays; + /** * Friendly Name. */ @@ -67,46 +53,6 @@ public class ServerEndpointCreateParameters { @JsonProperty(value = "properties.serverResourceId") private String serverResourceId; - /** - * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @param location the location value to set - * @return the ServerEndpointCreateParameters object itself. - */ - public ServerEndpointCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @param tags the tags value to set - * @return the ServerEndpointCreateParameters object itself. - */ - public ServerEndpointCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get server Local path. * @@ -167,6 +113,26 @@ public ServerEndpointCreateParameters withVolumeFreeSpacePercent(Integer volumeF return this; } + /** + * Get tier files older than days. + * + * @return the tierFilesOlderThanDays value + */ + public Integer tierFilesOlderThanDays() { + return this.tierFilesOlderThanDays; + } + + /** + * Set tier files older than days. + * + * @param tierFilesOlderThanDays the tierFilesOlderThanDays value to set + * @return the ServerEndpointCreateParameters object itself. + */ + public ServerEndpointCreateParameters withTierFilesOlderThanDays(Integer tierFilesOlderThanDays) { + this.tierFilesOlderThanDays = tierFilesOlderThanDays; + return this; + } + /** * Get friendly Name. * diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointUpdateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointUpdateParameters.java index b2bb7fae7011..b6d5a4477486 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointUpdateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/ServerEndpointUpdateParameters.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.storagesync; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -17,12 +16,6 @@ */ @JsonFlatten public class ServerEndpointUpdateParameters { - /** - * The user-specified tags associated with the server endpoint. - */ - @JsonProperty(value = "tags") - private Map tags; - /** * Cloud Tiering. Possible values include: 'on', 'off'. */ @@ -36,24 +29,10 @@ public class ServerEndpointUpdateParameters { private Integer volumeFreeSpacePercent; /** - * Get the user-specified tags associated with the server endpoint. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the user-specified tags associated with the server endpoint. - * - * @param tags the tags value to set - * @return the ServerEndpointUpdateParameters object itself. + * Tier files older than days. */ - public ServerEndpointUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } + @JsonProperty(value = "properties.tierFilesOlderThanDays") + private Integer tierFilesOlderThanDays; /** * Get cloud Tiering. Possible values include: 'on', 'off'. @@ -95,4 +74,24 @@ public ServerEndpointUpdateParameters withVolumeFreeSpacePercent(Integer volumeF return this; } + /** + * Get tier files older than days. + * + * @return the tierFilesOlderThanDays value + */ + public Integer tierFilesOlderThanDays() { + return this.tierFilesOlderThanDays; + } + + /** + * Set tier files older than days. + * + * @param tierFilesOlderThanDays the tierFilesOlderThanDays value to set + * @return the ServerEndpointUpdateParameters object itself. + */ + public ServerEndpointUpdateParameters withTierFilesOlderThanDays(Integer tierFilesOlderThanDays) { + this.tierFilesOlderThanDays = tierFilesOlderThanDays; + return this; + } + } diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/StorageSyncServiceCreateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/StorageSyncServiceCreateParameters.java index 4f077389ffd9..e41ebd94a125 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/StorageSyncServiceCreateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/StorageSyncServiceCreateParameters.java @@ -22,7 +22,7 @@ public class StorageSyncServiceCreateParameters { * once it is created, but if an identical geo region is specified on * update, the request will succeed. */ - @JsonProperty(value = "location") + @JsonProperty(value = "location", required = true) private String location; /** @@ -35,6 +35,12 @@ public class StorageSyncServiceCreateParameters { @JsonProperty(value = "tags") private Map tags; + /** + * The properties property. + */ + @JsonProperty(value = "properties") + private Object properties; + /** * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. * @@ -75,4 +81,24 @@ public StorageSyncServiceCreateParameters withTags(Map tags) { return this; } + /** + * Get the properties value. + * + * @return the properties value + */ + public Object properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the StorageSyncServiceCreateParameters object itself. + */ + public StorageSyncServiceCreateParameters withProperties(Object properties) { + this.properties = properties; + return this; + } + } diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/SyncGroupCreateParameters.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/SyncGroupCreateParameters.java index 6fe71452e6af..ad05c67a90ba 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/SyncGroupCreateParameters.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/SyncGroupCreateParameters.java @@ -8,79 +8,19 @@ package com.microsoft.azure.management.storagesync; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.ProxyResource; /** * The parameters used when creating a sync group. */ -public class SyncGroupCreateParameters { - /** - * Required. Gets or sets the location of the resource. This will be one of - * the supported and registered Azure Geo Regions (e.g. West US, East US, - * Southeast Asia, etc.). The geo region of a resource cannot be changed - * once it is created, but if an identical geo region is specified on - * update, the request will succeed. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Gets or sets a list of key value pairs that describe the resource. These - * tags can be used for viewing and grouping this resource (across resource - * groups). A maximum of 15 tags can be provided for a resource. Each tag - * must have a key with a length no greater than 128 characters and a value - * with a length no greater than 256 characters. - */ - @JsonProperty(value = "tags") - private Map tags; - +public class SyncGroupCreateParameters extends ProxyResource { /** * The parameters used to create the sync group. */ @JsonProperty(value = "properties") private Object properties; - /** - * Get required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. - * - * @param location the location value to set - * @return the SyncGroupCreateParameters object itself. - */ - public SyncGroupCreateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. - * - * @param tags the tags value to set - * @return the SyncGroupCreateParameters object itself. - */ - public SyncGroupCreateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get the parameters used to create the sync group. * diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/TriggerRolloverRequest.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/TriggerRolloverRequest.java new file mode 100644 index 000000000000..6e5372620c24 --- /dev/null +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/TriggerRolloverRequest.java @@ -0,0 +1,43 @@ +/** + * 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.storagesync; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Trigger Rollover Request. + */ +public class TriggerRolloverRequest { + /** + * Certificate Data. + */ + @JsonProperty(value = "certificateData") + private String certificateData; + + /** + * Get certificate Data. + * + * @return the certificateData value + */ + public String certificateData() { + return this.certificateData; + } + + /** + * Set certificate Data. + * + * @param certificateData the certificateData value to set + * @return the TriggerRolloverRequest object itself. + */ + public TriggerRolloverRequest withCertificateData(String certificateData) { + this.certificateData = certificateData; + return this; + } + +} diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/WorkflowsListByStorageSyncServiceHeaders.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/WorkflowsListByStorageSyncServiceHeaders.java new file mode 100644 index 000000000000..d0f04105fa7a --- /dev/null +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/WorkflowsListByStorageSyncServiceHeaders.java @@ -0,0 +1,69 @@ +/** + * 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.storagesync; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines headers for ListByStorageSyncService operation. + */ +public class WorkflowsListByStorageSyncServiceHeaders { + /** + * request id. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /** + * correlation request id. + */ + @JsonProperty(value = "x-ms-correlation-request-id") + private String xMsCorrelationRequestId; + + /** + * Get request id. + * + * @return the xMsRequestId value + */ + public String xMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set request id. + * + * @param xMsRequestId the xMsRequestId value to set + * @return the WorkflowsListByStorageSyncServiceHeaders object itself. + */ + public WorkflowsListByStorageSyncServiceHeaders withXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get correlation request id. + * + * @return the xMsCorrelationRequestId value + */ + public String xMsCorrelationRequestId() { + return this.xMsCorrelationRequestId; + } + + /** + * Set correlation request id. + * + * @param xMsCorrelationRequestId the xMsCorrelationRequestId value to set + * @return the WorkflowsListByStorageSyncServiceHeaders object itself. + */ + public WorkflowsListByStorageSyncServiceHeaders withXMsCorrelationRequestId(String xMsCorrelationRequestId) { + this.xMsCorrelationRequestId = xMsCorrelationRequestId; + return this; + } + +} diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/RegisteredServersInner.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/RegisteredServersInner.java index 8f8734316fda..293c2f107907 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/RegisteredServersInner.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/RegisteredServersInner.java @@ -15,7 +15,9 @@ import com.microsoft.azure.management.storagesync.RegisteredServersDeleteHeaders; import com.microsoft.azure.management.storagesync.RegisteredServersGetHeaders; import com.microsoft.azure.management.storagesync.RegisteredServersListByStorageSyncServiceHeaders; +import com.microsoft.azure.management.storagesync.RegisteredServersTriggerRolloverHeaders; import com.microsoft.azure.management.storagesync.StorageSyncErrorException; +import com.microsoft.azure.management.storagesync.TriggerRolloverRequest; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponseWithHeaders; @@ -29,6 +31,7 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.Response; @@ -85,6 +88,14 @@ interface RegisteredServersService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("serverId") String serverId, @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.storagesync.RegisteredServers triggerRollover" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover") + Observable> triggerRollover(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("serverId") String serverId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TriggerRolloverRequest parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storagesync.RegisteredServers beginTriggerRollover" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover") + Observable> beginTriggerRollover(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("serverId") String serverId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TriggerRolloverRequest parameters, @Header("User-Agent") String userAgent); + } /** @@ -626,4 +637,349 @@ private ServiceResponseWithHeaders beginDe .buildWithHeaders(response, RegisteredServersDeleteHeaders.class); } + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void triggerRollover(String resourceGroupName, String storageSyncServiceName, String serverId) { + triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId).toBlocking().last().body(); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @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 triggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId), serviceCallback); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable triggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId) { + return triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> triggerRolloverWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String serverId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName is required and cannot be null."); + } + if (serverId == null) { + throw new IllegalArgumentException("Parameter serverId 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 certificateData = null; + TriggerRolloverRequest parameters = new TriggerRolloverRequest(); + parameters.withCertificateData(null); + Observable> observable = service.triggerRollover(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, serverId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), RegisteredServersTriggerRolloverHeaders.class); + } + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void triggerRollover(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData).toBlocking().last().body(); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @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 triggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData), serviceCallback); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable triggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + return triggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> triggerRolloverWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName is required and cannot be null."); + } + if (serverId == null) { + throw new IllegalArgumentException("Parameter serverId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + TriggerRolloverRequest parameters = new TriggerRolloverRequest(); + parameters.withCertificateData(certificateData); + Observable> observable = service.triggerRollover(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, serverId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new TypeToken() { }.getType(), RegisteredServersTriggerRolloverHeaders.class); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginTriggerRollover(String resourceGroupName, String storageSyncServiceName, String serverId) { + beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId).toBlocking().single().body(); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @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 beginTriggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId), serviceCallback); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginTriggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId) { + return beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginTriggerRolloverWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String serverId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName is required and cannot be null."); + } + if (serverId == null) { + throw new IllegalArgumentException("Parameter serverId 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 certificateData = null; + TriggerRolloverRequest parameters = new TriggerRolloverRequest(); + parameters.withCertificateData(null); + return service.beginTriggerRollover(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, serverId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginTriggerRolloverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginTriggerRollover(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData).toBlocking().single().body(); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @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 beginTriggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData), serviceCallback); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable beginTriggerRolloverAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + return beginTriggerRolloverWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, serverId, certificateData).map(new Func1, Void>() { + @Override + public Void call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Triggers Server certificate rollover. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId Server Id + * @param certificateData Certificate Data + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponseWithHeaders} object if successful. + */ + public Observable> beginTriggerRolloverWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String serverId, String certificateData) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName is required and cannot be null."); + } + if (serverId == null) { + throw new IllegalArgumentException("Parameter serverId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + TriggerRolloverRequest parameters = new TriggerRolloverRequest(); + parameters.withCertificateData(certificateData); + return service.beginTriggerRollover(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, serverId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = beginTriggerRolloverDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponseWithHeaders beginTriggerRolloverDelegate(Response response) throws StorageSyncErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(StorageSyncErrorException.class) + .buildWithHeaders(response, RegisteredServersTriggerRolloverHeaders.class); + } + } diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/ServerEndpointInner.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/ServerEndpointInner.java index e17e41d33213..6d16ee8ba1b3 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/ServerEndpointInner.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/ServerEndpointInner.java @@ -35,6 +35,12 @@ public class ServerEndpointInner extends ProxyResource { @JsonProperty(value = "properties.volumeFreeSpacePercent") private Integer volumeFreeSpacePercent; + /** + * Tier files older than days. + */ + @JsonProperty(value = "properties.tierFilesOlderThanDays") + private Integer tierFilesOlderThanDays; + /** * Friendly Name. */ @@ -131,6 +137,26 @@ public ServerEndpointInner withVolumeFreeSpacePercent(Integer volumeFreeSpacePer return this; } + /** + * Get tier files older than days. + * + * @return the tierFilesOlderThanDays value + */ + public Integer tierFilesOlderThanDays() { + return this.tierFilesOlderThanDays; + } + + /** + * Set tier files older than days. + * + * @param tierFilesOlderThanDays the tierFilesOlderThanDays value to set + * @return the ServerEndpointInner object itself. + */ + public ServerEndpointInner withTierFilesOlderThanDays(Integer tierFilesOlderThanDays) { + this.tierFilesOlderThanDays = tierFilesOlderThanDays; + return this; + } + /** * Get friendly Name. * diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/StorageSyncManagementClientImpl.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/StorageSyncManagementClientImpl.java index 173b6fc45771..0bec5b4aaeb9 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/StorageSyncManagementClientImpl.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/StorageSyncManagementClientImpl.java @@ -254,7 +254,7 @@ public StorageSyncManagementClientImpl(RestClient restClient) { } protected void initialize() { - this.apiVersion = "2018-04-02"; + this.apiVersion = "2018-07-01"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -275,6 +275,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "StorageSyncManagementClient", "2018-04-02"); + return String.format("%s (%s, %s)", super.userAgent(), "StorageSyncManagementClient", "2018-07-01"); } } diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/SyncGroupsInner.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/SyncGroupsInner.java index c77a3c3d9d27..27de422ccca8 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/SyncGroupsInner.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/SyncGroupsInner.java @@ -19,7 +19,6 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponseWithHeaders; -import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; @@ -67,7 +66,7 @@ interface SyncGroupsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storagesync.SyncGroups create" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}") - Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("syncGroupName") String syncGroupName, @Query("api-version") String apiVersion, @Body SyncGroupCreateParameters parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> create(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("syncGroupName") String syncGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SyncGroupCreateParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storagesync.SyncGroups get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}") @@ -176,14 +175,13 @@ private ServiceResponseWithHeaders, SyncGroupsListBySt * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageSyncServiceName Name of Storage Sync Service resource. * @param syncGroupName Name of Sync Group resource. - * @param parameters Sync Group Body * @throws IllegalArgumentException thrown if parameters fail the validation * @throws StorageSyncErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SyncGroupInner object if successful. */ - public SyncGroupInner create(String resourceGroupName, String storageSyncServiceName, String syncGroupName, SyncGroupCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, parameters).toBlocking().single().body(); + public SyncGroupInner create(String resourceGroupName, String storageSyncServiceName, String syncGroupName) { + return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName).toBlocking().single().body(); } /** @@ -192,13 +190,12 @@ public SyncGroupInner create(String resourceGroupName, String storageSyncService * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageSyncServiceName Name of Storage Sync Service resource. * @param syncGroupName Name of Sync Group resource. - * @param parameters Sync Group Body * @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 createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, SyncGroupCreateParameters parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, parameters), serviceCallback); + public ServiceFuture createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName), serviceCallback); } /** @@ -207,12 +204,11 @@ public ServiceFuture createAsync(String resourceGroupName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageSyncServiceName Name of Storage Sync Service resource. * @param syncGroupName Name of Sync Group resource. - * @param parameters Sync Group Body * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SyncGroupInner object */ - public Observable createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, SyncGroupCreateParameters parameters) { - return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, parameters).map(new Func1, SyncGroupInner>() { + public Observable createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName) { + return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName).map(new Func1, SyncGroupInner>() { @Override public SyncGroupInner call(ServiceResponseWithHeaders response) { return response.body(); @@ -226,11 +222,10 @@ public SyncGroupInner call(ServiceResponseWithHeaders> createWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, SyncGroupCreateParameters parameters) { + public Observable> createWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -246,11 +241,102 @@ public Observable, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponseWithHeaders clientResponse = createDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Create a new SyncGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param properties The parameters used to create the sync group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SyncGroupInner object if successful. + */ + public SyncGroupInner create(String resourceGroupName, String storageSyncServiceName, String syncGroupName, Object properties) { + return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties).toBlocking().single().body(); + } + + /** + * Create a new SyncGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param properties The parameters used to create the sync group + * @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 createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, Object properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties), serviceCallback); + } + + /** + * Create a new SyncGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param properties The parameters used to create the sync group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SyncGroupInner object + */ + public Observable createAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, Object properties) { + return createWithServiceResponseAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties).map(new Func1, SyncGroupInner>() { + @Override + public SyncGroupInner call(ServiceResponseWithHeaders response) { + return response.body(); + } + }); + } + + /** + * Create a new SyncGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param properties The parameters used to create the sync group + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SyncGroupInner object + */ + public Observable> createWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName, String syncGroupName, Object properties) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName is required and cannot be null."); + } + if (syncGroupName == null) { + throw new IllegalArgumentException("Parameter syncGroupName 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.create(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, syncGroupName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + SyncGroupCreateParameters parameters = new SyncGroupCreateParameters(); + parameters.withProperties(properties); + return service.create(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, syncGroupName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/WorkflowsInner.java b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/WorkflowsInner.java index be542c327041..abecc70ab2a4 100644 --- a/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/WorkflowsInner.java +++ b/azure-mgmt-storagesync/src/main/java/com/microsoft/azure/management/storagesync/implementation/WorkflowsInner.java @@ -13,10 +13,12 @@ import com.microsoft.azure.management.storagesync.StorageSyncErrorException; import com.microsoft.azure.management.storagesync.WorkflowsAbortHeaders; import com.microsoft.azure.management.storagesync.WorkflowsGetHeaders; +import com.microsoft.azure.management.storagesync.WorkflowsListByStorageSyncServiceHeaders; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.GET; import retrofit2.http.Header; @@ -54,6 +56,10 @@ public WorkflowsInner(Retrofit retrofit, StorageSyncManagementClientImpl client) * used by Retrofit to perform actually REST calls. */ interface WorkflowsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.storagesync.Workflows listByStorageSyncService" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows") + Observable> listByStorageSyncService(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @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.storagesync.Workflows get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows/{workflowId}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("storageSyncServiceName") String storageSyncServiceName, @Path("workflowId") String workflowId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -64,6 +70,97 @@ interface WorkflowsService { } + /** + * Get a Workflow List. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws StorageSyncErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<WorkflowInner> object if successful. + */ + public List listByStorageSyncService(String resourceGroupName, String storageSyncServiceName) { + return listByStorageSyncServiceWithServiceResponseAsync(resourceGroupName, storageSyncServiceName).toBlocking().single().body(); + } + + /** + * Get a Workflow List. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service 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 + */ + public ServiceFuture> listByStorageSyncServiceAsync(String resourceGroupName, String storageSyncServiceName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromHeaderResponse(listByStorageSyncServiceWithServiceResponseAsync(resourceGroupName, storageSyncServiceName), serviceCallback); + } + + /** + * Get a Workflow List. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<WorkflowInner> object + */ + public Observable> listByStorageSyncServiceAsync(String resourceGroupName, String storageSyncServiceName) { + return listByStorageSyncServiceWithServiceResponseAsync(resourceGroupName, storageSyncServiceName).map(new Func1, WorkflowsListByStorageSyncServiceHeaders>, List>() { + @Override + public List call(ServiceResponseWithHeaders, WorkflowsListByStorageSyncServiceHeaders> response) { + return response.body(); + } + }); + } + + /** + * Get a Workflow List. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<WorkflowInner> object + */ + public Observable, WorkflowsListByStorageSyncServiceHeaders>> listByStorageSyncServiceWithServiceResponseAsync(String resourceGroupName, String storageSyncServiceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (storageSyncServiceName == null) { + throw new IllegalArgumentException("Parameter storageSyncServiceName 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.listByStorageSyncService(this.client.subscriptionId(), resourceGroupName, storageSyncServiceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable, WorkflowsListByStorageSyncServiceHeaders>>>() { + @Override + public Observable, WorkflowsListByStorageSyncServiceHeaders>> call(Response response) { + try { + ServiceResponse> result = listByStorageSyncServiceDelegate(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); + } + } + }); + } + + private ServiceResponseWithHeaders, WorkflowsListByStorageSyncServiceHeaders> listByStorageSyncServiceDelegate(Response response) throws StorageSyncErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., StorageSyncErrorException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(StorageSyncErrorException.class) + .buildWithHeaders(response, WorkflowsListByStorageSyncServiceHeaders.class); + } + /** * Get Workflows resource. *