diff --git a/iotcentral/resource-manager/v2017_07_01_privatepreview/pom.xml b/iotcentral/resource-manager/v2017_07_01_privatepreview/pom.xml index 6e349a466fd6b..660ec60b31805 100644 --- a/iotcentral/resource-manager/v2017_07_01_privatepreview/pom.xml +++ b/iotcentral/resource-manager/v2017_07_01_privatepreview/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.0.0 + 0.0.3-beta ../../../pom.xml azure-mgmt-iotcentral @@ -19,7 +19,7 @@ jar Microsoft Azure SDK for IoTCentral Management This package contains Microsoft IoTCentral Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD diff --git a/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/App.java b/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/App.java index f14a7be9ced65..4695571735d18 100644 --- a/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/App.java +++ b/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/App.java @@ -77,36 +77,44 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup, Resource.UpdateWithTags, Update */ interface UpdateStages { /** - * The stage of the app {0} allowing to specify DisplayName. + * The stage of the app update allowing to specify DisplayName. */ interface WithDisplayName { /** * Specifies displayName. + * @param displayName The display name of the application + * @return the next update stage */ Update withDisplayName(String displayName); } /** - * The stage of the app {0} allowing to specify Subdomain. + * The stage of the app update allowing to specify Subdomain. */ interface WithSubdomain { /** * Specifies subdomain. + * @param subdomain The subdomain of the application + * @return the next update stage */ Update withSubdomain(String subdomain); } /** - * The stage of the app {0} allowing to specify Template. + * The stage of the app update allowing to specify Template. */ interface WithTemplate { /** * Specifies template. + * @param template The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch + * @return the next update stage */ Update withTemplate(String template); } diff --git a/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/IotCentralClientImpl.java b/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/IotCentralClientImpl.java index 1abd0722bf63e..a4b60888a031b 100644 --- a/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/IotCentralClientImpl.java +++ b/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/IotCentralClientImpl.java @@ -63,11 +63,11 @@ public String apiVersion() { return this.apiVersion; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +76,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +86,11 @@ public IotCentralClientImpl withAcceptLanguage(String acceptLanguage) { return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ private int longRunningOperationRetryTimeout; /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +109,11 @@ public IotCentralClientImpl withLongRunningOperationRetryTimeout(int longRunning return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ private boolean generateClientRequestId; /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @return the generateClientRequestId value. */ @@ -122,7 +122,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. * @return the service client itself @@ -205,6 +205,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "IotCentralClient", "2017-07-01-privatepreview"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "IotCentralClient", "2017-07-01-privatepreview"); } } diff --git a/iotcentral/resource-manager/v2018_09_01/pom.xml b/iotcentral/resource-manager/v2018_09_01/pom.xml index df7f0323b95e3..1b9dce2d1bde6 100644 --- a/iotcentral/resource-manager/v2018_09_01/pom.xml +++ b/iotcentral/resource-manager/v2018_09_01/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.0.0 + 0.0.3-beta ../../../pom.xml azure-mgmt-iotcentral @@ -19,7 +19,7 @@ jar Microsoft Azure SDK for IoTCentral Management This package contains Microsoft IoTCentral Management SDK. - https://github.com/Azure/azure-libraries-for-java + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +28,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/App.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/App.java index f51ff4e27af1a..b36a7d0b2866e 100644 --- a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/App.java +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/App.java @@ -77,36 +77,44 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup, Resource.UpdateWithTags, Update */ interface UpdateStages { /** - * The stage of the app {0} allowing to specify DisplayName. + * The stage of the app update allowing to specify DisplayName. */ interface WithDisplayName { /** * Specifies displayName. + * @param displayName The display name of the application + * @return the next update stage */ Update withDisplayName(String displayName); } /** - * The stage of the app {0} allowing to specify Subdomain. + * The stage of the app update allowing to specify Subdomain. */ interface WithSubdomain { /** * Specifies subdomain. + * @param subdomain The subdomain of the application + * @return the next update stage */ Update withSubdomain(String subdomain); } /** - * The stage of the app {0} allowing to specify Template. + * The stage of the app update allowing to specify Template. */ interface WithTemplate { /** * Specifies template. + * @param template The ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch + * @return the next update stage */ Update withTemplate(String template); } diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplate.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplate.java new file mode 100644 index 0000000000000..cec1a16fb3068 --- /dev/null +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplate.java @@ -0,0 +1,107 @@ +/** + * 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.iotcentral.v2018_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * IoT Central Application Template. + */ +public class AppTemplate { + /** + * The ID of the template. + */ + @JsonProperty(value = "manifestId", access = JsonProperty.Access.WRITE_ONLY) + private String manifestId; + + /** + * The version of the template. + */ + @JsonProperty(value = "manifestVersion", access = JsonProperty.Access.WRITE_ONLY) + private String manifestVersion; + + /** + * The name of the template. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The title of the template. + */ + @JsonProperty(value = "title", access = JsonProperty.Access.WRITE_ONLY) + private String title; + + /** + * The order of the template in the templates list. + */ + @JsonProperty(value = "order", access = JsonProperty.Access.WRITE_ONLY) + private Double order; + + /** + * The description of the template. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the ID of the template. + * + * @return the manifestId value + */ + public String manifestId() { + return this.manifestId; + } + + /** + * Get the version of the template. + * + * @return the manifestVersion value + */ + public String manifestVersion() { + return this.manifestVersion; + } + + /** + * Get the name of the template. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the title of the template. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Get the order of the template in the templates list. + * + * @return the order value + */ + public Double order() { + return this.order; + } + + /** + * Get the description of the template. + * + * @return the description value + */ + public String description() { + return this.description; + } + +} diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplatesResult.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplatesResult.java new file mode 100644 index 0000000000000..514cf925ebd26 --- /dev/null +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/AppTemplatesResult.java @@ -0,0 +1,31 @@ +/** + * 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.iotcentral.v2018_09_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.iotcentral.v2018_09_01.implementation.IoTCentralManager; +import com.microsoft.azure.management.iotcentral.v2018_09_01.implementation.AppTemplatesResultInner; +import java.util.List; + +/** + * Type representing AppTemplatesResult. + */ +public interface AppTemplatesResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/Apps.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/Apps.java index deec27d18075e..09558b861807b 100644 --- a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/Apps.java +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/Apps.java @@ -40,4 +40,12 @@ public interface Apps extends SupportsCreating, Supp */ Observable checkSubdomainAvailabilityAsync(OperationInputs operationInputs); + /** + * Get all available application templates. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable templatesAsync(); + } diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultImpl.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultImpl.java new file mode 100644 index 0000000000000..c11ac7ac90218 --- /dev/null +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultImpl.java @@ -0,0 +1,38 @@ +/** + * 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.iotcentral.v2018_09_01.implementation; + +import com.microsoft.azure.management.iotcentral.v2018_09_01.AppTemplatesResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.iotcentral.v2018_09_01.AppTemplate; + +class AppTemplatesResultImpl extends WrapperImpl implements AppTemplatesResult { + private final IoTCentralManager manager; + AppTemplatesResultImpl(AppTemplatesResultInner inner, IoTCentralManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public IoTCentralManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultInner.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultInner.java new file mode 100644 index 0000000000000..ee83c7ec52117 --- /dev/null +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppTemplatesResultInner.java @@ -0,0 +1,60 @@ +/** + * 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.iotcentral.v2018_09_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.iotcentral.v2018_09_01.AppTemplate; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A list of IoT Central Application Templates with a next link. + */ +public class AppTemplatesResultInner { + /** + * The link used to get the next page of IoT Central description objects. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * A list of IoT Central Application Templates. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /** + * Get the link used to get the next page of IoT Central description objects. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the link used to get the next page of IoT Central description objects. + * + * @param nextLink the nextLink value to set + * @return the AppTemplatesResultInner object itself. + */ + public AppTemplatesResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get a list of IoT Central Application Templates. + * + * @return the value value + */ + public List value() { + return this.value; + } + +} diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsImpl.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsImpl.java index 537fc693efa61..b26da401689d4 100644 --- a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsImpl.java +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsImpl.java @@ -23,6 +23,7 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; import com.microsoft.azure.management.iotcentral.v2018_09_01.AppAvailabilityInfo; +import com.microsoft.azure.management.iotcentral.v2018_09_01.AppTemplatesResult; import com.microsoft.azure.management.iotcentral.v2018_09_01.OperationInputs; class AppsImpl extends GroupableResourcesCoreImpl implements Apps { @@ -101,13 +102,13 @@ public App call(AppInner inner) { @Override public PagedList list() { AppsInner client = this.inner(); - return this.wrapList(client.list()); + return this.wrapList(client.listBySubscription()); } @Override public Observable listAsync() { AppsInner client = this.inner(); - return client.listAsync() + return client.listBySubscriptionAsync() .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { @@ -151,6 +152,18 @@ public AppAvailabilityInfo call(AppAvailabilityInfoInner inner) { }); } + @Override + public Observable templatesAsync() { + AppsInner client = this.inner(); + return client.templatesAsync() + .map(new Func1() { + @Override + public AppTemplatesResult call(AppTemplatesResultInner inner) { + return new AppTemplatesResultImpl(inner, manager()); + } + }); + } + @Override protected AppImpl wrapModel(AppInner inner) { return new AppImpl(inner.name(), inner, manager()); diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsInner.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsInner.java index f551023b24b2a..155f4ea40f057 100644 --- a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsInner.java +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/AppsInner.java @@ -10,7 +10,6 @@ import com.microsoft.azure.arm.collection.InnerSupportsGet; import com.microsoft.azure.arm.collection.InnerSupportsDelete; -import com.microsoft.azure.arm.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -46,7 +45,7 @@ * An instance of this class provides access to all the operations defined * in Apps. */ -public class AppsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class AppsInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private AppsService service; /** The service client containing this operation class. */ @@ -96,9 +95,9 @@ interface AppsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @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.iotcentral.v2018_09_01.Apps list" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iotcentral.v2018_09_01.Apps listBySubscription" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/IoTApps") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listBySubscription(@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.iotcentral.v2018_09_01.Apps listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps") @@ -112,9 +111,13 @@ interface AppsService { @POST("subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability") Observable> checkSubdomainAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body OperationInputs operationInputs, @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.iotcentral.v2018_09_01.Apps listNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iotcentral.v2018_09_01.Apps templates" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates") + Observable> templates(@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.iotcentral.v2018_09_01.Apps listBySubscriptionNext" }) @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listBySubscriptionNext(@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.iotcentral.v2018_09_01.Apps listByResourceGroupNext" }) @GET @@ -716,12 +719,12 @@ private ServiceResponse beginDeleteDelegate(Response respons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<AppInner> object if successful. */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + public PagedList listBySubscription() { + ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -733,13 +736,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), + listBySubscriptionSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listBySubscriptionNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -751,8 +754,8 @@ public Observable>> call(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<AppInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync() + public Observable> listBySubscriptionAsync() { + return listBySubscriptionWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -767,8 +770,8 @@ public Page call(ServiceResponse> response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<AppInner> object */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() + public Observable>> listBySubscriptionWithServiceResponseAsync() { + return listBySubscriptionSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -776,7 +779,7 @@ public Observable>> call(ServiceResponse>> call(ServiceResponse>> listSinglePageAsync() { + public Observable>> listBySubscriptionSinglePageAsync() { 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.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listBySubscriptionDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -808,7 +811,7 @@ public Observable>> call(Response r }); } - private ServiceResponse> listDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException { + private ServiceResponse> listBySubscriptionDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorDetailsException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorDetailsException.class) @@ -1090,6 +1093,78 @@ private ServiceResponse checkSubdomainAvailabilityDele .build(response); } + /** + * Get all available application templates. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorDetailsException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AppTemplatesResultInner object if successful. + */ + public AppTemplatesResultInner templates() { + return templatesWithServiceResponseAsync().toBlocking().single().body(); + } + + /** + * Get all available application templates. + * + * @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 templatesAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(templatesWithServiceResponseAsync(), serviceCallback); + } + + /** + * Get all available application templates. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppTemplatesResultInner object + */ + public Observable templatesAsync() { + return templatesWithServiceResponseAsync().map(new Func1, AppTemplatesResultInner>() { + @Override + public AppTemplatesResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get all available application templates. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AppTemplatesResultInner object + */ + public Observable> templatesWithServiceResponseAsync() { + 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.templates(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = templatesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse templatesDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorDetailsException.class) + .build(response); + } + /** * Get all IoT Central Applications in a subscription. * @@ -1099,12 +1174,12 @@ private ServiceResponse checkSubdomainAvailabilityDele * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<AppInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listBySubscriptionNext(final String nextPageLink) { + ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1118,13 +1193,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), + listBySubscriptionNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listBySubscriptionNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1137,8 +1212,8 @@ public Observable>> call(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<AppInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) + public Observable> listBySubscriptionNextAsync(final String nextPageLink) { + return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1154,8 +1229,8 @@ public Page call(ServiceResponse> response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<AppInner> object */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) + public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { + return listBySubscriptionNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1163,7 +1238,7 @@ public Observable>> call(ServiceResponse>> call(ServiceResponse>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listBySubscriptionNextSinglePageAsync(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.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listBySubscriptionNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1194,7 +1269,7 @@ public Observable>> call(Response r }); } - private ServiceResponse> listNextDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException { + private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorDetailsException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorDetailsException.class) diff --git a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/IotCentralClientImpl.java b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/IotCentralClientImpl.java index 39bad0a45afae..05afaa100cd86 100644 --- a/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/IotCentralClientImpl.java +++ b/iotcentral/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/iotcentral/v2018_09_01/implementation/IotCentralClientImpl.java @@ -63,11 +63,11 @@ public String apiVersion() { return this.apiVersion; } - /** Gets or sets the preferred language for the response. */ + /** The preferred language for the response. */ private String acceptLanguage; /** - * Gets Gets or sets the preferred language for the response. + * Gets The preferred language for the response. * * @return the acceptLanguage value. */ @@ -76,7 +76,7 @@ public String acceptLanguage() { } /** - * Sets Gets or sets the preferred language for the response. + * Sets The preferred language for the response. * * @param acceptLanguage the acceptLanguage value. * @return the service client itself @@ -86,11 +86,11 @@ public IotCentralClientImpl withAcceptLanguage(String acceptLanguage) { return this; } - /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */ + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ private int longRunningOperationRetryTimeout; /** - * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @return the longRunningOperationRetryTimeout value. */ @@ -99,7 +99,7 @@ public int longRunningOperationRetryTimeout() { } /** - * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. * * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. * @return the service client itself @@ -109,11 +109,11 @@ public IotCentralClientImpl withLongRunningOperationRetryTimeout(int longRunning return this; } - /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ private boolean generateClientRequestId; /** - * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @return the generateClientRequestId value. */ @@ -122,7 +122,7 @@ public boolean generateClientRequestId() { } /** - * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * * @param generateClientRequestId the generateClientRequestId value. * @return the service client itself @@ -205,6 +205,6 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "IotCentralClient", "2018-09-01"); + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "IotCentralClient", "2018-09-01"); } }