From 9a708fcba9146f27e404e3784aef864f9a535733 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 5 Nov 2018 16:51:40 +0000 Subject: [PATCH 1/5] Generated from 6533a0dd2a5dfbe7ec76f3f2b6c407c876d4315d Add missing endpoints to newest versions --- .../management/logic/v2016_06_01/Request.java | 95 ++++++ .../logic/v2016_06_01/RequestHistory.java | 67 ++++ .../v2016_06_01/RequestHistoryListResult.java | 32 ++ .../logic/v2016_06_01/Response.java | 95 ++++++ ...wRunActionRepetitionsRequestHistories.java | 44 +++ .../WorkflowRunActionRequestHistories.java | 42 +++ .../LogicManagementClientImpl.java | 28 ++ .../implementation/LogicManager.java | 24 ++ .../implementation/RequestHistoryImpl.java | 75 +++++ .../implementation/RequestHistoryInner.java | 127 ++++++++ .../RequestHistoryListResultImpl.java | 37 +++ .../RequestHistoryListResultInner.java | 70 +++++ ...ActionRepetitionsRequestHistoriesImpl.java | 55 ++++ ...ctionRepetitionsRequestHistoriesInner.java | 285 ++++++++++++++++++ ...WorkflowRunActionRequestHistoriesImpl.java | 55 ++++ ...orkflowRunActionRequestHistoriesInner.java | 271 +++++++++++++++++ .../logic/v2018_07_01_preview/Request.java | 95 ++++++ .../v2018_07_01_preview/RequestHistory.java | 67 ++++ .../RequestHistoryListResult.java | 32 ++ .../logic/v2018_07_01_preview/Response.java | 95 ++++++ ...wRunActionRepetitionsRequestHistories.java | 44 +++ .../WorkflowRunActionRequestHistories.java | 42 +++ .../LogicManagementClientImpl.java | 28 ++ .../implementation/LogicManager.java | 24 ++ .../implementation/RequestHistoryImpl.java | 75 +++++ .../implementation/RequestHistoryInner.java | 127 ++++++++ .../RequestHistoryListResultImpl.java | 37 +++ .../RequestHistoryListResultInner.java | 70 +++++ ...ActionRepetitionsRequestHistoriesImpl.java | 55 ++++ ...ctionRepetitionsRequestHistoriesInner.java | 285 ++++++++++++++++++ ...WorkflowRunActionRequestHistoriesImpl.java | 55 ++++ ...orkflowRunActionRequestHistoriesInner.java | 271 +++++++++++++++++ 32 files changed, 2804 insertions(+) create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Request.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistory.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistoryListResult.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Response.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryImpl.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultImpl.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultInner.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Request.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistory.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistoryListResult.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Response.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultInner.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Request.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Request.java new file mode 100644 index 000000000000..0c9dad68e0f2 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Request.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.logic.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A request. + */ +public class Request { + /** + * A list of all the headers attached to the request. + */ + @JsonProperty(value = "headers") + private Object headers; + + /** + * The destination for the request. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * The HTTP method used for the request. + */ + @JsonProperty(value = "method") + private String method; + + /** + * Get a list of all the headers attached to the request. + * + * @return the headers value + */ + public Object headers() { + return this.headers; + } + + /** + * Set a list of all the headers attached to the request. + * + * @param headers the headers value to set + * @return the Request object itself. + */ + public Request withHeaders(Object headers) { + this.headers = headers; + return this; + } + + /** + * Get the destination for the request. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the destination for the request. + * + * @param uri the uri value to set + * @return the Request object itself. + */ + public Request withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the HTTP method used for the request. + * + * @return the method value + */ + public String method() { + return this.method; + } + + /** + * Set the HTTP method used for the request. + * + * @param method the method value to set + * @return the Request object itself. + */ + public Request withMethod(String method) { + this.method = method; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistory.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistory.java new file mode 100644 index 000000000000..f027a500b2d6 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistory.java @@ -0,0 +1,67 @@ +/** + * 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.logic.v2016_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.LogicManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.RequestHistoryInner; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing RequestHistory. + */ +public interface RequestHistory extends HasInner, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistoryListResult.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistoryListResult.java new file mode 100644 index 000000000000..9d78a0de2ff2 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistoryListResult.java @@ -0,0 +1,32 @@ +/** + * 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.logic.v2016_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.LogicManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.RequestHistoryListResultInner; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.RequestHistoryInner; +import java.util.List; + +/** + * Type representing RequestHistoryListResult. + */ +public interface RequestHistoryListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Response.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Response.java new file mode 100644 index 000000000000..2cdd0f74df76 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/Response.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.logic.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A response. + */ +public class Response { + /** + * A list of all the headers attached to the response. + */ + @JsonProperty(value = "headers") + private Object headers; + + /** + * The status code of the response. + */ + @JsonProperty(value = "statusCode") + private Integer statusCode; + + /** + * Details on the location of the body content. + */ + @JsonProperty(value = "bodyLink") + private ContentLink bodyLink; + + /** + * Get a list of all the headers attached to the response. + * + * @return the headers value + */ + public Object headers() { + return this.headers; + } + + /** + * Set a list of all the headers attached to the response. + * + * @param headers the headers value to set + * @return the Response object itself. + */ + public Response withHeaders(Object headers) { + this.headers = headers; + return this; + } + + /** + * Get the status code of the response. + * + * @return the statusCode value + */ + public Integer statusCode() { + return this.statusCode; + } + + /** + * Set the status code of the response. + * + * @param statusCode the statusCode value to set + * @return the Response object itself. + */ + public Response withStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Get details on the location of the body content. + * + * @return the bodyLink value + */ + public ContentLink bodyLink() { + return this.bodyLink; + } + + /** + * Set details on the location of the body content. + * + * @param bodyLink the bodyLink value to set + * @return the Response object itself. + */ + public Response withBodyLink(ContentLink bodyLink) { + this.bodyLink = bodyLink; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java new file mode 100644 index 000000000000..e4119e561ca6 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java @@ -0,0 +1,44 @@ +/** + * 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.logic.v2016_06_01; + +import rx.Observable; + +/** + * Type representing WorkflowRunActionRepetitionsRequestHistories. + */ +public interface WorkflowRunActionRepetitionsRequestHistories { + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName); + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java new file mode 100644 index 000000000000..1c106201e231 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java @@ -0,0 +1,42 @@ +/** + * 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.logic.v2016_06_01; + +import rx.Observable; + +/** + * Type representing WorkflowRunActionRequestHistories. + */ +public interface WorkflowRunActionRequestHistories { + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName); + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManagementClientImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManagementClientImpl.java index cd2cb00cb2ee..029456a8d089 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManagementClientImpl.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManagementClientImpl.java @@ -244,6 +244,32 @@ public WorkflowRunActionRepetitionsInner workflowRunActionRepetitions() { return this.workflowRunActionRepetitions; } + /** + * The WorkflowRunActionRepetitionsRequestHistoriesInner object to access its operations. + */ + private WorkflowRunActionRepetitionsRequestHistoriesInner workflowRunActionRepetitionsRequestHistories; + + /** + * Gets the WorkflowRunActionRepetitionsRequestHistoriesInner object to access its operations. + * @return the WorkflowRunActionRepetitionsRequestHistoriesInner object. + */ + public WorkflowRunActionRepetitionsRequestHistoriesInner workflowRunActionRepetitionsRequestHistories() { + return this.workflowRunActionRepetitionsRequestHistories; + } + + /** + * The WorkflowRunActionRequestHistoriesInner object to access its operations. + */ + private WorkflowRunActionRequestHistoriesInner workflowRunActionRequestHistories; + + /** + * Gets the WorkflowRunActionRequestHistoriesInner object to access its operations. + * @return the WorkflowRunActionRequestHistoriesInner object. + */ + public WorkflowRunActionRequestHistoriesInner workflowRunActionRequestHistories() { + return this.workflowRunActionRequestHistories; + } + /** * The WorkflowRunActionScopedRepetitionsInner object to access its operations. */ @@ -429,6 +455,8 @@ protected void initialize() { this.workflowRuns = new WorkflowRunsInner(restClient().retrofit(), this); this.workflowRunActions = new WorkflowRunActionsInner(restClient().retrofit(), this); this.workflowRunActionRepetitions = new WorkflowRunActionRepetitionsInner(restClient().retrofit(), this); + this.workflowRunActionRepetitionsRequestHistories = new WorkflowRunActionRepetitionsRequestHistoriesInner(restClient().retrofit(), this); + this.workflowRunActionRequestHistories = new WorkflowRunActionRequestHistoriesInner(restClient().retrofit(), this); this.workflowRunActionScopedRepetitions = new WorkflowRunActionScopedRepetitionsInner(restClient().retrofit(), this); this.workflowRunOperations = new WorkflowRunOperationsInner(restClient().retrofit(), this); this.integrationAccounts = new IntegrationAccountsInner(restClient().retrofit(), this); diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManager.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManager.java index fd37a596cef8..1720bc4ca4d5 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManager.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/LogicManager.java @@ -23,6 +23,8 @@ import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRuns; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActions; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitions; +import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories; +import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRequestHistories; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionScopedRepetitions; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunOperations; import com.microsoft.azure.management.logic.v2016_06_01.IntegrationAccounts; @@ -48,6 +50,8 @@ public final class LogicManager extends ManagerCore implements RequestHistory { + private final LogicManager manager; + RequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java new file mode 100644 index 000000000000..770b1246278b --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java @@ -0,0 +1,127 @@ +/** + * 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.logic.v2016_06_01.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2016_06_01.Request; +import com.microsoft.azure.management.logic.v2016_06_01.Response; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * The request history. + */ +@SkipParentValidation +public class RequestHistoryInner extends Resource { + /** + * The time the request started. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The time the request ended. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The request. + */ + @JsonProperty(value = "request") + private Request request; + + /** + * The response. + */ + @JsonProperty(value = "response") + private Response response; + + /** + * Get the time the request started. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the time the request started. + * + * @param startTime the startTime value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the time the request ended. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the time the request ended. + * + * @param endTime the endTime value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the request. + * + * @return the request value + */ + public Request request() { + return this.request; + } + + /** + * Set the request. + * + * @param request the request value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withRequest(Request request) { + this.request = request; + return this; + } + + /** + * Get the response. + * + * @return the response value + */ + public Response response() { + return this.response; + } + + /** + * Set the response. + * + * @param response the response value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withResponse(Response response) { + this.response = response; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultImpl.java new file mode 100644 index 000000000000..bb832757a8a3 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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.logic.v2016_06_01.implementation; + +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class RequestHistoryListResultImpl extends WrapperImpl implements RequestHistoryListResult { + private final LogicManager manager; + RequestHistoryListResultImpl(RequestHistoryListResultInner inner, LogicManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultInner.java new file mode 100644 index 000000000000..2e8efd354f3e --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryListResultInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.logic.v2016_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of workflow request histories. + */ +public class RequestHistoryListResultInner { + /** + * A list of workflow request histories. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get a list of workflow request histories. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of workflow request histories. + * + * @param value the value value to set + * @return the RequestHistoryListResultInner object itself. + */ + public RequestHistoryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the RequestHistoryListResultInner object itself. + */ + public RequestHistoryListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java new file mode 100644 index 000000000000..c300a774d46a --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java @@ -0,0 +1,55 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.logic.v2016_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryListResult; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistory; + +class WorkflowRunActionRepetitionsRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRepetitionsRequestHistories { + private final LogicManager manager; + + WorkflowRunActionRepetitionsRequestHistoriesImpl(LogicManager manager) { + super(manager.inner().workflowRunActionRepetitionsRequestHistories()); + this.manager = manager; + } + + public LogicManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); + return client.listAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .map(new Func1() { + @Override + public RequestHistoryListResult call(RequestHistoryListResultInner inner) { + return new RequestHistoryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); + return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName) + .map(new Func1() { + @Override + public RequestHistory call(RequestHistoryInner inner) { + return new RequestHistoryImpl(inner, manager()); + } + }); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java new file mode 100644 index 000000000000..baf6d9d5d359 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -0,0 +1,285 @@ +/** + * 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.logic.v2016_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionRepetitionsRequestHistories. + */ +public class WorkflowRunActionRepetitionsRequestHistoriesInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionRepetitionsRequestHistoriesService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionRepetitionsRequestHistoriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionRepetitionsRequestHistoriesInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionRepetitionsRequestHistoriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionRepetitionsRequestHistories to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionRepetitionsRequestHistoriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories list" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @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.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories get" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @Path("requestHistoryName") String requestHistoryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryListResultInner object if successful. + */ + public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @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 listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, RequestHistoryListResultInner>() { + @Override + public RequestHistoryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (repetitionName == null) { + throw new IllegalArgumentException("Parameter repetitionName 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(), resourceGroupName, workflowName, runName, actionName, repetitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryInner object if successful. + */ + public RequestHistoryInner get(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName).toBlocking().single().body(); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName), serviceCallback); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName).map(new Func1, RequestHistoryInner>() { + @Override + public RequestHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (repetitionName == null) { + throw new IllegalArgumentException("Parameter repetitionName is required and cannot be null."); + } + if (requestHistoryName == null) { + throw new IllegalArgumentException("Parameter requestHistoryName 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.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java new file mode 100644 index 000000000000..33b33f3b8353 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java @@ -0,0 +1,55 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.logic.v2016_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRequestHistories; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryListResult; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistory; + +class WorkflowRunActionRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRequestHistories { + private final LogicManager manager; + + WorkflowRunActionRequestHistoriesImpl(LogicManager manager) { + super(manager.inner().workflowRunActionRequestHistories()); + this.manager = manager; + } + + public LogicManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + WorkflowRunActionRequestHistoriesInner client = this.inner(); + return client.listAsync(resourceGroupName, workflowName, runName, actionName) + .map(new Func1() { + @Override + public RequestHistoryListResult call(RequestHistoryListResultInner inner) { + return new RequestHistoryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + WorkflowRunActionRequestHistoriesInner client = this.inner(); + return client.getAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName) + .map(new Func1() { + @Override + public RequestHistory call(RequestHistoryInner inner) { + return new RequestHistoryImpl(inner, manager()); + } + }); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java new file mode 100644 index 000000000000..b6b40395b1a1 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -0,0 +1,271 @@ +/** + * 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.logic.v2016_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionRequestHistories. + */ +public class WorkflowRunActionRequestHistoriesInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionRequestHistoriesService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionRequestHistoriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionRequestHistoriesInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionRequestHistoriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionRequestHistories to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionRequestHistoriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRequestHistories list" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @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.logic.v2016_06_01.WorkflowRunActionRequestHistories get" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("requestHistoryName") String requestHistoryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryListResultInner object if successful. + */ + public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @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 listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, RequestHistoryListResultInner>() { + @Override + public RequestHistoryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName 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(), resourceGroupName, workflowName, runName, actionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryInner object if successful. + */ + public RequestHistoryInner get(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName).toBlocking().single().body(); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName), serviceCallback); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName).map(new Func1, RequestHistoryInner>() { + @Override + public RequestHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (requestHistoryName == null) { + throw new IllegalArgumentException("Parameter requestHistoryName 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.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, requestHistoryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Request.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Request.java new file mode 100644 index 000000000000..2f79a0073c9f --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Request.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.logic.v2018_07_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A request. + */ +public class Request { + /** + * A list of all the headers attached to the request. + */ + @JsonProperty(value = "headers") + private Object headers; + + /** + * The destination for the request. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * The HTTP method used for the request. + */ + @JsonProperty(value = "method") + private String method; + + /** + * Get a list of all the headers attached to the request. + * + * @return the headers value + */ + public Object headers() { + return this.headers; + } + + /** + * Set a list of all the headers attached to the request. + * + * @param headers the headers value to set + * @return the Request object itself. + */ + public Request withHeaders(Object headers) { + this.headers = headers; + return this; + } + + /** + * Get the destination for the request. + * + * @return the uri value + */ + public String uri() { + return this.uri; + } + + /** + * Set the destination for the request. + * + * @param uri the uri value to set + * @return the Request object itself. + */ + public Request withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the HTTP method used for the request. + * + * @return the method value + */ + public String method() { + return this.method; + } + + /** + * Set the HTTP method used for the request. + * + * @param method the method value to set + * @return the Request object itself. + */ + public Request withMethod(String method) { + this.method = method; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistory.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistory.java new file mode 100644 index 000000000000..35a83dd1cc34 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistory.java @@ -0,0 +1,67 @@ +/** + * 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.logic.v2018_07_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.LogicManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.RequestHistoryInner; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing RequestHistory. + */ +public interface RequestHistory extends HasInner, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistoryListResult.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistoryListResult.java new file mode 100644 index 000000000000..b331db46843a --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistoryListResult.java @@ -0,0 +1,32 @@ +/** + * 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.logic.v2018_07_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.LogicManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.RequestHistoryListResultInner; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.RequestHistoryInner; +import java.util.List; + +/** + * Type representing RequestHistoryListResult. + */ +public interface RequestHistoryListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Response.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Response.java new file mode 100644 index 000000000000..7e823cf1ee88 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Response.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.logic.v2018_07_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A response. + */ +public class Response { + /** + * A list of all the headers attached to the response. + */ + @JsonProperty(value = "headers") + private Object headers; + + /** + * The status code of the response. + */ + @JsonProperty(value = "statusCode") + private Integer statusCode; + + /** + * Details on the location of the body content. + */ + @JsonProperty(value = "bodyLink") + private ContentLink bodyLink; + + /** + * Get a list of all the headers attached to the response. + * + * @return the headers value + */ + public Object headers() { + return this.headers; + } + + /** + * Set a list of all the headers attached to the response. + * + * @param headers the headers value to set + * @return the Response object itself. + */ + public Response withHeaders(Object headers) { + this.headers = headers; + return this; + } + + /** + * Get the status code of the response. + * + * @return the statusCode value + */ + public Integer statusCode() { + return this.statusCode; + } + + /** + * Set the status code of the response. + * + * @param statusCode the statusCode value to set + * @return the Response object itself. + */ + public Response withStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Get details on the location of the body content. + * + * @return the bodyLink value + */ + public ContentLink bodyLink() { + return this.bodyLink; + } + + /** + * Set details on the location of the body content. + * + * @param bodyLink the bodyLink value to set + * @return the Response object itself. + */ + public Response withBodyLink(ContentLink bodyLink) { + this.bodyLink = bodyLink; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java new file mode 100644 index 000000000000..01759845319a --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java @@ -0,0 +1,44 @@ +/** + * 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.logic.v2018_07_01_preview; + +import rx.Observable; + +/** + * Type representing WorkflowRunActionRepetitionsRequestHistories. + */ +public interface WorkflowRunActionRepetitionsRequestHistories { + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName); + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java new file mode 100644 index 000000000000..e84d1ac1fe83 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java @@ -0,0 +1,42 @@ +/** + * 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.logic.v2018_07_01_preview; + +import rx.Observable; + +/** + * Type representing WorkflowRunActionRequestHistories. + */ +public interface WorkflowRunActionRequestHistories { + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName); + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManagementClientImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManagementClientImpl.java index 0277166998ee..04fa1224d900 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManagementClientImpl.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManagementClientImpl.java @@ -236,6 +236,32 @@ public WorkflowRunActionRepetitionsInner workflowRunActionRepetitions() { return this.workflowRunActionRepetitions; } + /** + * The WorkflowRunActionRepetitionsRequestHistoriesInner object to access its operations. + */ + private WorkflowRunActionRepetitionsRequestHistoriesInner workflowRunActionRepetitionsRequestHistories; + + /** + * Gets the WorkflowRunActionRepetitionsRequestHistoriesInner object to access its operations. + * @return the WorkflowRunActionRepetitionsRequestHistoriesInner object. + */ + public WorkflowRunActionRepetitionsRequestHistoriesInner workflowRunActionRepetitionsRequestHistories() { + return this.workflowRunActionRepetitionsRequestHistories; + } + + /** + * The WorkflowRunActionRequestHistoriesInner object to access its operations. + */ + private WorkflowRunActionRequestHistoriesInner workflowRunActionRequestHistories; + + /** + * Gets the WorkflowRunActionRequestHistoriesInner object to access its operations. + * @return the WorkflowRunActionRequestHistoriesInner object. + */ + public WorkflowRunActionRequestHistoriesInner workflowRunActionRequestHistories() { + return this.workflowRunActionRequestHistories; + } + /** * The WorkflowRunActionScopeRepetitionsInner object to access its operations. */ @@ -435,6 +461,8 @@ protected void initialize() { this.workflowRuns = new WorkflowRunsInner(restClient().retrofit(), this); this.workflowRunActions = new WorkflowRunActionsInner(restClient().retrofit(), this); this.workflowRunActionRepetitions = new WorkflowRunActionRepetitionsInner(restClient().retrofit(), this); + this.workflowRunActionRepetitionsRequestHistories = new WorkflowRunActionRepetitionsRequestHistoriesInner(restClient().retrofit(), this); + this.workflowRunActionRequestHistories = new WorkflowRunActionRequestHistoriesInner(restClient().retrofit(), this); this.workflowRunActionScopeRepetitions = new WorkflowRunActionScopeRepetitionsInner(restClient().retrofit(), this); this.workflowRunOperations = new WorkflowRunOperationsInner(restClient().retrofit(), this); this.integrationAccounts = new IntegrationAccountsInner(restClient().retrofit(), this); diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManager.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManager.java index 2af0b89f16f7..0ea5a4d60e86 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManager.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/LogicManager.java @@ -24,6 +24,8 @@ import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRuns; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActions; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitions; +import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories; +import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionScopeRepetitions; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunOperations; import com.microsoft.azure.management.logic.v2018_07_01_preview.IntegrationAccounts; @@ -51,6 +53,8 @@ public final class LogicManager extends ManagerCore implements RequestHistory { + private final LogicManager manager; + RequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java new file mode 100644 index 000000000000..55b7bfe84980 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java @@ -0,0 +1,127 @@ +/** + * 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.logic.v2018_07_01_preview.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Request; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Response; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * The request history. + */ +@SkipParentValidation +public class RequestHistoryInner extends Resource { + /** + * The time the request started. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The time the request ended. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The request. + */ + @JsonProperty(value = "request") + private Request request; + + /** + * The response. + */ + @JsonProperty(value = "response") + private Response response; + + /** + * Get the time the request started. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the time the request started. + * + * @param startTime the startTime value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the time the request ended. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the time the request ended. + * + * @param endTime the endTime value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the request. + * + * @return the request value + */ + public Request request() { + return this.request; + } + + /** + * Set the request. + * + * @param request the request value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withRequest(Request request) { + this.request = request; + return this; + } + + /** + * Get the response. + * + * @return the response value + */ + public Response response() { + return this.response; + } + + /** + * Set the response. + * + * @param response the response value to set + * @return the RequestHistoryInner object itself. + */ + public RequestHistoryInner withResponse(Response response) { + this.response = response; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultImpl.java new file mode 100644 index 000000000000..c77b19170144 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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.logic.v2018_07_01_preview.implementation; + +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class RequestHistoryListResultImpl extends WrapperImpl implements RequestHistoryListResult { + private final LogicManager manager; + RequestHistoryListResultImpl(RequestHistoryListResultInner inner, LogicManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultInner.java new file mode 100644 index 000000000000..a66a3c26f602 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryListResultInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of workflow request histories. + */ +public class RequestHistoryListResultInner { + /** + * A list of workflow request histories. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get a list of workflow request histories. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of workflow request histories. + * + * @param value the value value to set + * @return the RequestHistoryListResultInner object itself. + */ + public RequestHistoryListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the RequestHistoryListResultInner object itself. + */ + public RequestHistoryListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java new file mode 100644 index 000000000000..729953ef7bd8 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java @@ -0,0 +1,55 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryListResult; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistory; + +class WorkflowRunActionRepetitionsRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRepetitionsRequestHistories { + private final LogicManager manager; + + WorkflowRunActionRepetitionsRequestHistoriesImpl(LogicManager manager) { + super(manager.inner().workflowRunActionRepetitionsRequestHistories()); + this.manager = manager; + } + + public LogicManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); + return client.listAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .map(new Func1() { + @Override + public RequestHistoryListResult call(RequestHistoryListResultInner inner) { + return new RequestHistoryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); + return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName) + .map(new Func1() { + @Override + public RequestHistory call(RequestHistoryInner inner) { + return new RequestHistoryImpl(inner, manager()); + } + }); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java new file mode 100644 index 000000000000..db673744f0f2 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -0,0 +1,285 @@ +/** + * 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.logic.v2018_07_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionRepetitionsRequestHistories. + */ +public class WorkflowRunActionRepetitionsRequestHistoriesInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionRepetitionsRequestHistoriesService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionRepetitionsRequestHistoriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionRepetitionsRequestHistoriesInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionRepetitionsRequestHistoriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionRepetitionsRequestHistories to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionRepetitionsRequestHistoriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories list" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @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.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories get" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @Path("requestHistoryName") String requestHistoryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryListResultInner object if successful. + */ + public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @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 listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, RequestHistoryListResultInner>() { + @Override + public RequestHistoryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (repetitionName == null) { + throw new IllegalArgumentException("Parameter repetitionName 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(), resourceGroupName, workflowName, runName, actionName, repetitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryInner object if successful. + */ + public RequestHistoryInner get(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName).toBlocking().single().body(); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName), serviceCallback); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName).map(new Func1, RequestHistoryInner>() { + @Override + public RequestHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a workflow run repetition request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (repetitionName == null) { + throw new IllegalArgumentException("Parameter repetitionName is required and cannot be null."); + } + if (requestHistoryName == null) { + throw new IllegalArgumentException("Parameter requestHistoryName 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.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java new file mode 100644 index 000000000000..dc69e00c31ba --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java @@ -0,0 +1,55 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryListResult; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistory; + +class WorkflowRunActionRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRequestHistories { + private final LogicManager manager; + + WorkflowRunActionRequestHistoriesImpl(LogicManager manager) { + super(manager.inner().workflowRunActionRequestHistories()); + this.manager = manager; + } + + public LogicManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + WorkflowRunActionRequestHistoriesInner client = this.inner(); + return client.listAsync(resourceGroupName, workflowName, runName, actionName) + .map(new Func1() { + @Override + public RequestHistoryListResult call(RequestHistoryListResultInner inner) { + return new RequestHistoryListResultImpl(inner, manager()); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + WorkflowRunActionRequestHistoriesInner client = this.inner(); + return client.getAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName) + .map(new Func1() { + @Override + public RequestHistory call(RequestHistoryInner inner) { + return new RequestHistoryImpl(inner, manager()); + } + }); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java new file mode 100644 index 000000000000..be99c46e83dd --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -0,0 +1,271 @@ +/** + * 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.logic.v2018_07_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionRequestHistories. + */ +public class WorkflowRunActionRequestHistoriesInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionRequestHistoriesService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionRequestHistoriesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionRequestHistoriesInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionRequestHistoriesService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionRequestHistories to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionRequestHistoriesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories list" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @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.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories get" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("requestHistoryName") String requestHistoryName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryListResultInner object if successful. + */ + public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @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 listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, RequestHistoryListResultInner>() { + @Override + public RequestHistoryListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryListResultInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName 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(), resourceGroupName, workflowName, runName, actionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the RequestHistoryInner object if successful. + */ + public RequestHistoryInner get(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName).toBlocking().single().body(); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName), serviceCallback); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName).map(new Func1, RequestHistoryInner>() { + @Override + public RequestHistoryInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a workflow run request history. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param actionName The workflow action name. + * @param requestHistoryName The request history name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RequestHistoryInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + 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 (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (runName == null) { + throw new IllegalArgumentException("Parameter runName is required and cannot be null."); + } + if (actionName == null) { + throw new IllegalArgumentException("Parameter actionName is required and cannot be null."); + } + if (requestHistoryName == null) { + throw new IllegalArgumentException("Parameter requestHistoryName 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.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, requestHistoryName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} From 3036a44638bb69d83da4021fc5ac7d1c87ff0ef2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 5 Nov 2018 18:35:15 +0000 Subject: [PATCH 2/5] Generated from 09ee5609f7e335c47444a741f70625da9ce05630 Changing copy error of POST to GET. Added missing page links --- .../ActionRunWorkflowRequestHistory.java | 69 ++++++ ...titionActionRunWorkflowRequestHistory.java | 69 ++++++ ...wRunActionRepetitionsRequestHistories.java | 14 +- .../WorkflowRunActionRequestHistories.java | 14 +- .../ActionRunWorkflowRequestHistoryImpl.java | 95 ++++++++ ...onActionRunWorkflowRequestHistoryImpl.java | 97 ++++++++ ...ActionRepetitionsRequestHistoriesImpl.java | 36 +-- ...ctionRepetitionsRequestHistoriesInner.java | 211 +++++++++++++++--- ...WorkflowRunActionRequestHistoriesImpl.java | 36 +-- ...orkflowRunActionRequestHistoriesInner.java | 210 ++++++++++++++--- .../ActionRunWorkflowRequestHistory.java | 69 ++++++ ...titionActionRunWorkflowRequestHistory.java | 69 ++++++ ...wRunActionRepetitionsRequestHistories.java | 14 +- .../WorkflowRunActionRequestHistories.java | 14 +- .../ActionRunWorkflowRequestHistoryImpl.java | 95 ++++++++ ...onActionRunWorkflowRequestHistoryImpl.java | 97 ++++++++ ...ActionRepetitionsRequestHistoriesImpl.java | 36 +-- ...ctionRepetitionsRequestHistoriesInner.java | 211 +++++++++++++++--- ...WorkflowRunActionRequestHistoriesImpl.java | 36 +-- ...orkflowRunActionRequestHistoriesInner.java | 210 ++++++++++++++--- 20 files changed, 1526 insertions(+), 176 deletions(-) create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RepetitionActionRunWorkflowRequestHistory.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/ActionRunWorkflowRequestHistoryImpl.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RepetitionActionRunWorkflowRequestHistory.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/ActionRunWorkflowRequestHistoryImpl.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java new file mode 100644 index 000000000000..931565bdc66c --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.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.logic.v2016_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.RequestHistoryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.LogicManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing ActionRunWorkflowRequestHistory. + */ +public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RepetitionActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RepetitionActionRunWorkflowRequestHistory.java new file mode 100644 index 000000000000..ee3cb1a0888d --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RepetitionActionRunWorkflowRequestHistory.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.logic.v2016_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.RequestHistoryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.LogicManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing RepetitionActionRunWorkflowRequestHistory. + */ +public interface RepetitionActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java index e4119e561ca6..257abd53cc86 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRepetitionsRequestHistories.java @@ -9,36 +9,38 @@ package com.microsoft.azure.management.logic.v2016_06_01; import rx.Observable; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.WorkflowRunActionRepetitionsRequestHistoriesInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing WorkflowRunActionRepetitionsRequestHistories. */ -public interface WorkflowRunActionRepetitionsRequestHistories { +public interface WorkflowRunActionRepetitionsRequestHistories extends HasInner { /** - * List a workflow run repetition request history. + * Gets a workflow run repetition request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName); + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); /** - * Gets a workflow run repetition request history. + * List a workflow run repetition request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. * @param repetitionName The workflow repetition. - * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); + Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName); } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java index 1c106201e231..04d9ef9ec3b5 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/WorkflowRunActionRequestHistories.java @@ -9,34 +9,36 @@ package com.microsoft.azure.management.logic.v2016_06_01; import rx.Observable; +import com.microsoft.azure.management.logic.v2016_06_01.implementation.WorkflowRunActionRequestHistoriesInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing WorkflowRunActionRequestHistories. */ -public interface WorkflowRunActionRequestHistories { +public interface WorkflowRunActionRequestHistories extends HasInner { /** - * List a workflow run request history. + * Gets a workflow run request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. + * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName); + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); /** - * Gets a workflow run request history. + * List a workflow run request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. - * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); + Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName); } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/ActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/ActionRunWorkflowRequestHistoryImpl.java new file mode 100644 index 000000000000..b95100fba3b0 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/ActionRunWorkflowRequestHistoryImpl.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.logic.v2016_06_01.implementation; + +import com.microsoft.azure.management.logic.v2016_06_01.ActionRunWorkflowRequestHistory; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2016_06_01.Request; +import com.microsoft.azure.management.logic.v2016_06_01.Response; +import java.util.Map; + +class ActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements ActionRunWorkflowRequestHistory { + private final LogicManager manager; + private String resourceGroupName; + private String workflowName; + private String runName; + private String actionName; + private String requestHistoryName; + + ActionRunWorkflowRequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(null, inner); + this.manager = manager; + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workflowName = IdParsingUtils.getValueFromIdByName(inner.id(), "workflows"); + this.runName = IdParsingUtils.getValueFromIdByName(inner.id(), "runs"); + this.actionName = IdParsingUtils.getValueFromIdByName(inner.id(), "actions"); + this.requestHistoryName = IdParsingUtils.getValueFromIdByName(inner.id(), "requestHistories"); + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WorkflowRunActionRequestHistoriesInner client = this.manager().inner().workflowRunActionRequestHistories(); + return client.getAsync(this.resourceGroupName, this.workflowName, this.runName, this.actionName, this.requestHistoryName); + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java new file mode 100644 index 000000000000..000630d37a7b --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java @@ -0,0 +1,97 @@ +/** + * 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.logic.v2016_06_01.implementation; + +import com.microsoft.azure.management.logic.v2016_06_01.RepetitionActionRunWorkflowRequestHistory; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2016_06_01.Request; +import com.microsoft.azure.management.logic.v2016_06_01.Response; +import java.util.Map; + +class RepetitionActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements RepetitionActionRunWorkflowRequestHistory { + private final LogicManager manager; + private String resourceGroupName; + private String workflowName; + private String runName; + private String actionName; + private String repetitionName; + private String requestHistoryName; + + RepetitionActionRunWorkflowRequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(null, inner); + this.manager = manager; + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workflowName = IdParsingUtils.getValueFromIdByName(inner.id(), "workflows"); + this.runName = IdParsingUtils.getValueFromIdByName(inner.id(), "runs"); + this.actionName = IdParsingUtils.getValueFromIdByName(inner.id(), "actions"); + this.repetitionName = IdParsingUtils.getValueFromIdByName(inner.id(), "repetitions"); + this.requestHistoryName = IdParsingUtils.getValueFromIdByName(inner.id(), "requestHistories"); + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.manager().inner().workflowRunActionRepetitionsRequestHistories(); + return client.getAsync(this.resourceGroupName, this.workflowName, this.runName, this.actionName, this.repetitionName, this.requestHistoryName); + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java index c300a774d46a..08f9b6b0256e 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java @@ -4,17 +4,17 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.logic.v2016_06_01.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories; -import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryListResult; -import com.microsoft.azure.management.logic.v2016_06_01.RequestHistory; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.logic.v2016_06_01.RepetitionActionRunWorkflowRequestHistory; class WorkflowRunActionRepetitionsRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRepetitionsRequestHistories { private final LogicManager manager; @@ -28,28 +28,38 @@ public LogicManager manager() { return this.manager; } + private RepetitionActionRunWorkflowRequestHistoryImpl wrapModel(RequestHistoryInner inner) { + return new RepetitionActionRunWorkflowRequestHistoryImpl(inner, manager()); + } + @Override - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); return client.listAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) - .map(new Func1() { + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { @Override - public RequestHistoryListResult call(RequestHistoryListResultInner inner) { - return new RequestHistoryListResultImpl(inner, manager()); + public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } }); } @Override - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName) - .map(new Func1() { + .map(new Func1() { @Override - public RequestHistory call(RequestHistoryInner inner) { - return new RequestHistoryImpl(inner, manager()); + public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } - }); + }); } } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index baf6d9d5d359..990620342e79 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -10,17 +10,23 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; -import retrofit2.http.POST; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -52,13 +58,17 @@ public WorkflowRunActionRepetitionsRequestHistoriesInner(Retrofit retrofit, Logi */ interface WorkflowRunActionRepetitionsRequestHistoriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @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.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories get" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @Path("requestHistoryName") String requestHistoryName, @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.logic.v2016_06_01.WorkflowRunActionRepetitionsRequestHistories listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -72,10 +82,16 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RequestHistoryListResultInner object if successful. + * @return the PagedList<RequestHistoryInner> object if successful. */ - public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -90,8 +106,16 @@ public RequestHistoryListResultInner list(String resourceGroupName, String workf * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -103,15 +127,16 @@ public ServiceFuture listAsync(String resourceGro * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RequestHistoryListResultInner object + * @return the observable to the PagedList<RequestHistoryInner> object */ - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, RequestHistoryListResultInner>() { - @Override - public RequestHistoryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -123,9 +148,34 @@ public RequestHistoryListResultInner call(ServiceResponse> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run repetition request history. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param workflowName The workflow name. + ServiceResponse> * @param runName The workflow run name. + ServiceResponse> * @param actionName The workflow action name. + ServiceResponse> * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -148,12 +198,12 @@ public Observable> listWithServic throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, repetitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -161,9 +211,9 @@ public Observable> call(Response< }); } - private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -282,4 +332,115 @@ private ServiceResponse getDelegate(Response .build(response); } + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RequestHistoryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run repetition request history. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(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()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java index 33b33f3b8353..c5eecd007766 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesImpl.java @@ -4,17 +4,17 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.logic.v2016_06_01.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRequestHistories; -import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryListResult; -import com.microsoft.azure.management.logic.v2016_06_01.RequestHistory; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.logic.v2016_06_01.ActionRunWorkflowRequestHistory; class WorkflowRunActionRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRequestHistories { private final LogicManager manager; @@ -28,28 +28,38 @@ public LogicManager manager() { return this.manager; } + private ActionRunWorkflowRequestHistoryImpl wrapModel(RequestHistoryInner inner) { + return new ActionRunWorkflowRequestHistoryImpl(inner, manager()); + } + @Override - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { WorkflowRunActionRequestHistoriesInner client = this.inner(); return client.listAsync(resourceGroupName, workflowName, runName, actionName) - .map(new Func1() { + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { @Override - public RequestHistoryListResult call(RequestHistoryListResultInner inner) { - return new RequestHistoryListResultImpl(inner, manager()); + public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } }); } @Override - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { WorkflowRunActionRequestHistoriesInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName) - .map(new Func1() { + .map(new Func1() { @Override - public RequestHistory call(RequestHistoryInner inner) { - return new RequestHistoryImpl(inner, manager()); + public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } - }); + }); } } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java index b6b40395b1a1..0ade5d577f22 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -10,17 +10,23 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; -import retrofit2.http.POST; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -52,13 +58,17 @@ public WorkflowRunActionRequestHistoriesInner(Retrofit retrofit, LogicManagement */ interface WorkflowRunActionRequestHistoriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowRunActionRequestHistories list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @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.logic.v2016_06_01.WorkflowRunActionRequestHistories get" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("requestHistoryName") String requestHistoryName, @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.logic.v2016_06_01.WorkflowRunActionRequestHistories listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -71,10 +81,16 @@ interface WorkflowRunActionRequestHistoriesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RequestHistoryListResultInner object if successful. + * @return the PagedList<RequestHistoryInner> object if successful. */ - public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -88,8 +104,16 @@ public RequestHistoryListResultInner list(String resourceGroupName, String workf * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, workflowName, runName, actionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -100,15 +124,16 @@ public ServiceFuture listAsync(String resourceGro * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RequestHistoryListResultInner object + * @return the observable to the PagedList<RequestHistoryInner> object */ - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, RequestHistoryListResultInner>() { - @Override - public RequestHistoryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -119,9 +144,33 @@ public RequestHistoryListResultInner call(ServiceResponse> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listSinglePageAsync(resourceGroupName, workflowName, runName, actionName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run request history. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param workflowName The workflow name. + ServiceResponse> * @param runName The workflow run name. + ServiceResponse> * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -141,12 +190,12 @@ public Observable> listWithServic throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -154,9 +203,9 @@ public Observable> call(Response< }); } - private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -268,4 +317,115 @@ private ServiceResponse getDelegate(Response .build(response); } + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RequestHistoryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run request history. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(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()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java new file mode 100644 index 000000000000..639a96a7853b --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.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.logic.v2018_07_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.RequestHistoryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.LogicManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing ActionRunWorkflowRequestHistory. + */ +public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RepetitionActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RepetitionActionRunWorkflowRequestHistory.java new file mode 100644 index 000000000000..6d1b6fdfe398 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RepetitionActionRunWorkflowRequestHistory.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.logic.v2018_07_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.RequestHistoryInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.LogicManager; +import org.joda.time.DateTime; +import java.util.Map; + +/** + * Type representing RepetitionActionRunWorkflowRequestHistory. + */ +public interface RepetitionActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the endTime value. + */ + DateTime endTime(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the request value. + */ + Request request(); + + /** + * @return the response value. + */ + Response response(); + + /** + * @return the startTime value. + */ + DateTime startTime(); + + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java index 01759845319a..e2d0bad8e759 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRepetitionsRequestHistories.java @@ -9,36 +9,38 @@ package com.microsoft.azure.management.logic.v2018_07_01_preview; import rx.Observable; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.WorkflowRunActionRepetitionsRequestHistoriesInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing WorkflowRunActionRepetitionsRequestHistories. */ -public interface WorkflowRunActionRepetitionsRequestHistories { +public interface WorkflowRunActionRepetitionsRequestHistories extends HasInner { /** - * List a workflow run repetition request history. + * Gets a workflow run repetition request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. * @param repetitionName The workflow repetition. + * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName); + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); /** - * Gets a workflow run repetition request history. + * List a workflow run repetition request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. * @param repetitionName The workflow repetition. - * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName); + Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java index e84d1ac1fe83..1ba98d25163c 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowRunActionRequestHistories.java @@ -9,34 +9,36 @@ package com.microsoft.azure.management.logic.v2018_07_01_preview; import rx.Observable; +import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.WorkflowRunActionRequestHistoriesInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing WorkflowRunActionRequestHistories. */ -public interface WorkflowRunActionRequestHistories { +public interface WorkflowRunActionRequestHistories extends HasInner { /** - * List a workflow run request history. + * Gets a workflow run request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. + * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName); + Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); /** - * Gets a workflow run request history. + * List a workflow run request history. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param runName The workflow run name. * @param actionName The workflow action name. - * @param requestHistoryName The request history name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName); + Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/ActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/ActionRunWorkflowRequestHistoryImpl.java new file mode 100644 index 000000000000..232d3631282b --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/ActionRunWorkflowRequestHistoryImpl.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.logic.v2018_07_01_preview.implementation; + +import com.microsoft.azure.management.logic.v2018_07_01_preview.ActionRunWorkflowRequestHistory; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Request; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Response; +import java.util.Map; + +class ActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements ActionRunWorkflowRequestHistory { + private final LogicManager manager; + private String resourceGroupName; + private String workflowName; + private String runName; + private String actionName; + private String requestHistoryName; + + ActionRunWorkflowRequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(null, inner); + this.manager = manager; + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workflowName = IdParsingUtils.getValueFromIdByName(inner.id(), "workflows"); + this.runName = IdParsingUtils.getValueFromIdByName(inner.id(), "runs"); + this.actionName = IdParsingUtils.getValueFromIdByName(inner.id(), "actions"); + this.requestHistoryName = IdParsingUtils.getValueFromIdByName(inner.id(), "requestHistories"); + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WorkflowRunActionRequestHistoriesInner client = this.manager().inner().workflowRunActionRequestHistories(); + return client.getAsync(this.resourceGroupName, this.workflowName, this.runName, this.actionName, this.requestHistoryName); + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java new file mode 100644 index 000000000000..4f9f8a439dfb --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java @@ -0,0 +1,97 @@ +/** + * 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.logic.v2018_07_01_preview.implementation; + +import com.microsoft.azure.management.logic.v2018_07_01_preview.RepetitionActionRunWorkflowRequestHistory; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Request; +import com.microsoft.azure.management.logic.v2018_07_01_preview.Response; +import java.util.Map; + +class RepetitionActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements RepetitionActionRunWorkflowRequestHistory { + private final LogicManager manager; + private String resourceGroupName; + private String workflowName; + private String runName; + private String actionName; + private String repetitionName; + private String requestHistoryName; + + RepetitionActionRunWorkflowRequestHistoryImpl(RequestHistoryInner inner, LogicManager manager) { + super(null, inner); + this.manager = manager; + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workflowName = IdParsingUtils.getValueFromIdByName(inner.id(), "workflows"); + this.runName = IdParsingUtils.getValueFromIdByName(inner.id(), "runs"); + this.actionName = IdParsingUtils.getValueFromIdByName(inner.id(), "actions"); + this.repetitionName = IdParsingUtils.getValueFromIdByName(inner.id(), "repetitions"); + this.requestHistoryName = IdParsingUtils.getValueFromIdByName(inner.id(), "requestHistories"); + } + + @Override + public LogicManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + WorkflowRunActionRepetitionsRequestHistoriesInner client = this.manager().inner().workflowRunActionRepetitionsRequestHistories(); + return client.getAsync(this.resourceGroupName, this.workflowName, this.runName, this.actionName, this.repetitionName, this.requestHistoryName); + } + + + + @Override + public DateTime endTime() { + return this.inner().endTime(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public Request request() { + return this.inner().request(); + } + + @Override + public Response response() { + return this.inner().response(); + } + + @Override + public DateTime startTime() { + return this.inner().startTime(); + } + + @Override + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java index 729953ef7bd8..e00992df2df5 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java @@ -4,17 +4,17 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories; -import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryListResult; -import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistory; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RepetitionActionRunWorkflowRequestHistory; class WorkflowRunActionRepetitionsRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRepetitionsRequestHistories { private final LogicManager manager; @@ -28,28 +28,38 @@ public LogicManager manager() { return this.manager; } + private RepetitionActionRunWorkflowRequestHistoryImpl wrapModel(RequestHistoryInner inner) { + return new RepetitionActionRunWorkflowRequestHistoryImpl(inner, manager()); + } + @Override - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); return client.listAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) - .map(new Func1() { + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { @Override - public RequestHistoryListResult call(RequestHistoryListResultInner inner) { - return new RequestHistoryListResultImpl(inner, manager()); + public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } }); } @Override - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, String requestHistoryName) { WorkflowRunActionRepetitionsRequestHistoriesInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName) - .map(new Func1() { + .map(new Func1() { @Override - public RequestHistory call(RequestHistoryInner inner) { - return new RequestHistoryImpl(inner, manager()); + public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } - }); + }); } } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index db673744f0f2..1c5fc1ea4fe9 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -10,17 +10,23 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; -import retrofit2.http.POST; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -52,13 +58,17 @@ public WorkflowRunActionRepetitionsRequestHistoriesInner(Retrofit retrofit, Logi */ interface WorkflowRunActionRepetitionsRequestHistoriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @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.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories get" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("repetitionName") String repetitionName, @Path("requestHistoryName") String requestHistoryName, @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.logic.v2018_07_01_preview.WorkflowRunActionRepetitionsRequestHistories listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -72,10 +82,16 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RequestHistoryListResultInner object if successful. + * @return the PagedList<RequestHistoryInner> object if successful. */ - public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -90,8 +106,16 @@ public RequestHistoryListResultInner list(String resourceGroupName, String workf * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -103,15 +127,16 @@ public ServiceFuture listAsync(String resourceGro * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RequestHistoryListResultInner object + * @return the observable to the PagedList<RequestHistoryInner> object */ - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, RequestHistoryListResultInner>() { - @Override - public RequestHistoryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -123,9 +148,34 @@ public RequestHistoryListResultInner call(ServiceResponse> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run repetition request history. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param workflowName The workflow name. + ServiceResponse> * @param runName The workflow run name. + ServiceResponse> * @param actionName The workflow action name. + ServiceResponse> * @param repetitionName The workflow repetition. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -148,12 +198,12 @@ public Observable> listWithServic throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, repetitionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -161,9 +211,9 @@ public Observable> call(Response< }); } - private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -282,4 +332,115 @@ private ServiceResponse getDelegate(Response .build(response); } + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RequestHistoryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a workflow run repetition request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run repetition request history. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(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()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java index dc69e00c31ba..ceded3b85eab 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java @@ -4,17 +4,17 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories; -import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryListResult; -import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistory; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.logic.v2018_07_01_preview.ActionRunWorkflowRequestHistory; class WorkflowRunActionRequestHistoriesImpl extends WrapperImpl implements WorkflowRunActionRequestHistories { private final LogicManager manager; @@ -28,28 +28,38 @@ public LogicManager manager() { return this.manager; } + private ActionRunWorkflowRequestHistoryImpl wrapModel(RequestHistoryInner inner) { + return new ActionRunWorkflowRequestHistoryImpl(inner, manager()); + } + @Override - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { WorkflowRunActionRequestHistoriesInner client = this.inner(); return client.listAsync(resourceGroupName, workflowName, runName, actionName) - .map(new Func1() { + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { @Override - public RequestHistoryListResult call(RequestHistoryListResultInner inner) { - return new RequestHistoryListResultImpl(inner, manager()); + public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } }); } @Override - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String requestHistoryName) { WorkflowRunActionRequestHistoriesInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName) - .map(new Func1() { + .map(new Func1() { @Override - public RequestHistory call(RequestHistoryInner inner) { - return new RequestHistoryImpl(inner, manager()); + public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { + return wrapModel(inner); } - }); + }); } } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java index be99c46e83dd..97530d5a5b34 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -10,17 +10,23 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; -import retrofit2.http.POST; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -52,13 +58,17 @@ public WorkflowRunActionRequestHistoriesInner(Retrofit retrofit, LogicManagement */ interface WorkflowRunActionRequestHistoriesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @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.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories get" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("actionName") String actionName, @Path("requestHistoryName") String requestHistoryName, @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.logic.v2018_07_01_preview.WorkflowRunActionRequestHistories listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -71,10 +81,16 @@ interface WorkflowRunActionRequestHistoriesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the RequestHistoryListResultInner object if successful. + * @return the PagedList<RequestHistoryInner> object if successful. */ - public RequestHistoryListResultInner list(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -88,8 +104,16 @@ public RequestHistoryListResultInner list(String resourceGroupName, String workf * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, workflowName, runName, actionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -100,15 +124,16 @@ public ServiceFuture listAsync(String resourceGro * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RequestHistoryListResultInner object + * @return the observable to the PagedList<RequestHistoryInner> object */ - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, RequestHistoryListResultInner>() { - @Override - public RequestHistoryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -119,9 +144,33 @@ public RequestHistoryListResultInner call(ServiceResponse> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listSinglePageAsync(resourceGroupName, workflowName, runName, actionName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run request history. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param workflowName The workflow name. + ServiceResponse> * @param runName The workflow run name. + ServiceResponse> * @param actionName The workflow action name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -141,12 +190,12 @@ public Observable> listWithServic throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, runName, actionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -154,9 +203,9 @@ public Observable> call(Response< }); } - private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -268,4 +317,115 @@ private ServiceResponse getDelegate(Response .build(response); } + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<RequestHistoryInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List a workflow run request history. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<RequestHistoryInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * List a workflow run request history. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<RequestHistoryInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(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()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } From 49398337cf469373c28dd86707503f36f8d95d7c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 5 Nov 2018 18:52:58 +0000 Subject: [PATCH 3/5] Generated from 1bbdab407fa1f6f3e68f40d006d153dcea4a0b44 Fix for top level properties errir --- .../ActionRunWorkflowRequestHistory.java | 20 +-- ...titionActionRunWorkflowRequestHistory.java | 20 +-- .../v2016_06_01/RequestHistoryProperties.java | 122 ++++++++++++++++++ .../ActionRunWorkflowRequestHistoryImpl.java | 23 +--- ...onActionRunWorkflowRequestHistoryImpl.java | 23 +--- .../implementation/RequestHistoryInner.java | 104 ++------------- .../ActionRunWorkflowRequestHistory.java | 20 +-- ...titionActionRunWorkflowRequestHistory.java | 20 +-- .../RequestHistoryProperties.java | 122 ++++++++++++++++++ .../ActionRunWorkflowRequestHistoryImpl.java | 23 +--- ...onActionRunWorkflowRequestHistoryImpl.java | 23 +--- .../implementation/RequestHistoryInner.java | 104 ++------------- 12 files changed, 288 insertions(+), 336 deletions(-) create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/RequestHistoryProperties.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/RequestHistoryProperties.java diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java index 931565bdc66c..6bbc26fa28d9 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ActionRunWorkflowRequestHistory.java @@ -14,18 +14,12 @@ import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.logic.v2016_06_01.implementation.LogicManager; -import org.joda.time.DateTime; import java.util.Map; /** * Type representing ActionRunWorkflowRequestHistory. */ public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { - /** - * @return the endTime value. - */ - DateTime endTime(); - /** * @return the id value. */ @@ -42,19 +36,9 @@ public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { - /** - * @return the endTime value. - */ - DateTime endTime(); - /** * @return the id value. */ @@ -42,19 +36,9 @@ public interface RepetitionActionRunWorkflowRequestHistory extends HasInner implements ActionRunWorkflowRequestHistory { @@ -47,11 +45,6 @@ protected Observable getInnerAsync() { - @Override - public DateTime endTime() { - return this.inner().endTime(); - } - @Override public String id() { return this.inner().id(); @@ -68,18 +61,8 @@ public String name() { } @Override - public Request request() { - return this.inner().request(); - } - - @Override - public Response response() { - return this.inner().response(); - } - - @Override - public DateTime startTime() { - return this.inner().startTime(); + public RequestHistoryProperties properties() { + return this.inner().properties(); } @Override diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java index 000630d37a7b..100332830e53 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java @@ -11,9 +11,7 @@ import com.microsoft.azure.management.logic.v2016_06_01.RepetitionActionRunWorkflowRequestHistory; import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.v2016_06_01.Request; -import com.microsoft.azure.management.logic.v2016_06_01.Response; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryProperties; import java.util.Map; class RepetitionActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements RepetitionActionRunWorkflowRequestHistory { @@ -49,11 +47,6 @@ protected Observable getInnerAsync() { - @Override - public DateTime endTime() { - return this.inner().endTime(); - } - @Override public String id() { return this.inner().id(); @@ -70,18 +63,8 @@ public String name() { } @Override - public Request request() { - return this.inner().request(); - } - - @Override - public Response response() { - return this.inner().response(); - } - - @Override - public DateTime startTime() { - return this.inner().startTime(); + public RequestHistoryProperties properties() { + return this.inner().properties(); } @Override diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java index 770b1246278b..3f951cfe5d99 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/RequestHistoryInner.java @@ -8,9 +8,7 @@ package com.microsoft.azure.management.logic.v2016_06_01.implementation; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.v2016_06_01.Request; -import com.microsoft.azure.management.logic.v2016_06_01.Response; +import com.microsoft.azure.management.logic.v2016_06_01.RequestHistoryProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; @@ -21,106 +19,28 @@ @SkipParentValidation public class RequestHistoryInner extends Resource { /** - * The time the request started. + * The request history properties. */ - @JsonProperty(value = "startTime") - private DateTime startTime; + @JsonProperty(value = "properties") + private RequestHistoryProperties properties; /** - * The time the request ended. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * The request. - */ - @JsonProperty(value = "request") - private Request request; - - /** - * The response. - */ - @JsonProperty(value = "response") - private Response response; - - /** - * Get the time the request started. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the time the request started. - * - * @param startTime the startTime value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the time the request ended. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the time the request ended. - * - * @param endTime the endTime value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the request. - * - * @return the request value - */ - public Request request() { - return this.request; - } - - /** - * Set the request. - * - * @param request the request value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withRequest(Request request) { - this.request = request; - return this; - } - - /** - * Get the response. + * Get the request history properties. * - * @return the response value + * @return the properties value */ - public Response response() { - return this.response; + public RequestHistoryProperties properties() { + return this.properties; } /** - * Set the response. + * Set the request history properties. * - * @param response the response value to set + * @param properties the properties value to set * @return the RequestHistoryInner object itself. */ - public RequestHistoryInner withResponse(Response response) { - this.response = response; + public RequestHistoryInner withProperties(RequestHistoryProperties properties) { + this.properties = properties; return this; } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java index 639a96a7853b..19e58da862ef 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ActionRunWorkflowRequestHistory.java @@ -14,18 +14,12 @@ import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.logic.v2018_07_01_preview.implementation.LogicManager; -import org.joda.time.DateTime; import java.util.Map; /** * Type representing ActionRunWorkflowRequestHistory. */ public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { - /** - * @return the endTime value. - */ - DateTime endTime(); - /** * @return the id value. */ @@ -42,19 +36,9 @@ public interface ActionRunWorkflowRequestHistory extends HasInner, Indexable, Refreshable, HasManager { - /** - * @return the endTime value. - */ - DateTime endTime(); - /** * @return the id value. */ @@ -42,19 +36,9 @@ public interface RepetitionActionRunWorkflowRequestHistory extends HasInner implements ActionRunWorkflowRequestHistory { @@ -47,11 +45,6 @@ protected Observable getInnerAsync() { - @Override - public DateTime endTime() { - return this.inner().endTime(); - } - @Override public String id() { return this.inner().id(); @@ -68,18 +61,8 @@ public String name() { } @Override - public Request request() { - return this.inner().request(); - } - - @Override - public Response response() { - return this.inner().response(); - } - - @Override - public DateTime startTime() { - return this.inner().startTime(); + public RequestHistoryProperties properties() { + return this.inner().properties(); } @Override diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java index 4f9f8a439dfb..587991bd8bd2 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RepetitionActionRunWorkflowRequestHistoryImpl.java @@ -11,9 +11,7 @@ import com.microsoft.azure.management.logic.v2018_07_01_preview.RepetitionActionRunWorkflowRequestHistory; import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.v2018_07_01_preview.Request; -import com.microsoft.azure.management.logic.v2018_07_01_preview.Response; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryProperties; import java.util.Map; class RepetitionActionRunWorkflowRequestHistoryImpl extends IndexableRefreshableWrapperImpl implements RepetitionActionRunWorkflowRequestHistory { @@ -49,11 +47,6 @@ protected Observable getInnerAsync() { - @Override - public DateTime endTime() { - return this.inner().endTime(); - } - @Override public String id() { return this.inner().id(); @@ -70,18 +63,8 @@ public String name() { } @Override - public Request request() { - return this.inner().request(); - } - - @Override - public Response response() { - return this.inner().response(); - } - - @Override - public DateTime startTime() { - return this.inner().startTime(); + public RequestHistoryProperties properties() { + return this.inner().properties(); } @Override diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java index 55b7bfe84980..207c5677a895 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/RequestHistoryInner.java @@ -8,9 +8,7 @@ package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation; -import org.joda.time.DateTime; -import com.microsoft.azure.management.logic.v2018_07_01_preview.Request; -import com.microsoft.azure.management.logic.v2018_07_01_preview.Response; +import com.microsoft.azure.management.logic.v2018_07_01_preview.RequestHistoryProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; @@ -21,106 +19,28 @@ @SkipParentValidation public class RequestHistoryInner extends Resource { /** - * The time the request started. + * The request history properties. */ - @JsonProperty(value = "startTime") - private DateTime startTime; + @JsonProperty(value = "properties") + private RequestHistoryProperties properties; /** - * The time the request ended. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * The request. - */ - @JsonProperty(value = "request") - private Request request; - - /** - * The response. - */ - @JsonProperty(value = "response") - private Response response; - - /** - * Get the time the request started. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the time the request started. - * - * @param startTime the startTime value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the time the request ended. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the time the request ended. - * - * @param endTime the endTime value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the request. - * - * @return the request value - */ - public Request request() { - return this.request; - } - - /** - * Set the request. - * - * @param request the request value to set - * @return the RequestHistoryInner object itself. - */ - public RequestHistoryInner withRequest(Request request) { - this.request = request; - return this; - } - - /** - * Get the response. + * Get the request history properties. * - * @return the response value + * @return the properties value */ - public Response response() { - return this.response; + public RequestHistoryProperties properties() { + return this.properties; } /** - * Set the response. + * Set the request history properties. * - * @param response the response value to set + * @param properties the properties value to set * @return the RequestHistoryInner object itself. */ - public RequestHistoryInner withResponse(Response response) { - this.response = response; + public RequestHistoryInner withProperties(RequestHistoryProperties properties) { + this.properties = properties; return this; } From e0c16080e7b72fcdd40cb7b95a9af9450ebc79b0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 14 Nov 2018 23:16:09 +0000 Subject: [PATCH 4/5] Generated from 7ecc9d663ef1e01cd44bd527cc11dfc3f07f6bcb Rename CloudError to not a potentially reserved name and removed the x-ms-external flag --- .../logic/v2016_06_01/ApiError.java | 43 ++++++ .../logic/v2016_06_01/ApiErrorBody.java | 125 ++++++++++++++++++ .../logic/v2016_06_01/ApiErrorException.java | 44 ++++++ ...ctionRepetitionsRequestHistoriesInner.java | 26 ++-- ...orkflowRunActionRequestHistoriesInner.java | 26 ++-- .../logic/v2018_07_01_preview/ApiError.java | 43 ++++++ .../v2018_07_01_preview/ApiErrorBody.java | 125 ++++++++++++++++++ .../ApiErrorException.java | 44 ++++++ ...ctionRepetitionsRequestHistoriesInner.java | 26 ++-- ...orkflowRunActionRequestHistoriesInner.java | 26 ++-- 10 files changed, 476 insertions(+), 52 deletions(-) create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiError.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorBody.java create mode 100644 logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorException.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiError.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorBody.java create mode 100644 logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorException.java diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiError.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiError.java new file mode 100644 index 000000000000..ee9292973163 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiError.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.logic.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the Logic App service. + */ +public class ApiError { + /** + * The error property. + */ + @JsonProperty(value = "error") + private ApiErrorBody error; + + /** + * Get the error value. + * + * @return the error value + */ + public ApiErrorBody error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ApiErrorBody error) { + this.error = error; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorBody.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorBody.java new file mode 100644 index 000000000000..4eb14d97c1da --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorBody.java @@ -0,0 +1,125 @@ +/** + * 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.logic.v2016_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the Logic App service. + */ +public class ApiErrorBody { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code") + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The target of the particular error. For example, the name of the + * property in error. + */ + @JsonProperty(value = "target") + private String target; + + /** + * A list of additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target of the particular error. For example, the name of the property in error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target of the particular error. For example, the name of the property in error. + * + * @param target the target value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get a list of additional details about the error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set a list of additional details about the error. + * + * @param details the details value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorException.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorException.java new file mode 100644 index 000000000000..05b26329a0b0 --- /dev/null +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/ApiErrorException.java @@ -0,0 +1,44 @@ +/** + * 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.logic.v2016_06_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index 990620342e79..cab538353bda 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.v2016_06_01.ApiErrorException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -80,7 +80,7 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -211,10 +211,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -228,7 +228,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -337,7 +337,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -436,10 +436,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java index 0ade5d577f22..fc3c04b7fba4 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.v2016_06_01.ApiErrorException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -79,7 +79,7 @@ interface WorkflowRunActionRequestHistoriesService { * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -203,10 +203,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -219,7 +219,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -322,7 +322,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -421,10 +421,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiError.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiError.java new file mode 100644 index 000000000000..8c201fe7e249 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiError.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.logic.v2018_07_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the Logic App service. + */ +public class ApiError { + /** + * The error property. + */ + @JsonProperty(value = "error") + private ApiErrorBody error; + + /** + * Get the error value. + * + * @return the error value + */ + public ApiErrorBody error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ApiError object itself. + */ + public ApiError withError(ApiErrorBody error) { + this.error = error; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorBody.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorBody.java new file mode 100644 index 000000000000..47058e7a069e --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorBody.java @@ -0,0 +1,125 @@ +/** + * 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.logic.v2018_07_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An error response from the Logic App service. + */ +public class ApiErrorBody { + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ + @JsonProperty(value = "code") + private String code; + + /** + * A message describing the error, intended to be suitable for display in a + * user interface. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The target of the particular error. For example, the name of the + * property in error. + */ + @JsonProperty(value = "target") + private String target; + + /** + * A list of additional details about the error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an identifier for the error. Codes are invariant and are intended to be consumed programmatically. + * + * @param code the code value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message describing the error, intended to be suitable for display in a user interface. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message describing the error, intended to be suitable for display in a user interface. + * + * @param message the message value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target of the particular error. For example, the name of the property in error. + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target of the particular error. For example, the name of the property in error. + * + * @param target the target value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get a list of additional details about the error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set a list of additional details about the error. + * + * @param details the details value to set + * @return the ApiErrorBody object itself. + */ + public ApiErrorBody withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorException.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorException.java new file mode 100644 index 000000000000..a6265abb4f78 --- /dev/null +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/ApiErrorException.java @@ -0,0 +1,44 @@ +/** + * 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.logic.v2018_07_01_preview; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ApiError information. + */ +public class ApiErrorException extends RestException { + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ApiErrorException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ApiErrorException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ApiErrorException(final String message, final Response response, final ApiError body) { + super(message, response, body); + } + + @Override + public ApiError body() { + return (ApiError) super.body(); + } +} diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index 1c5fc1ea4fe9..ddc1ae07237b 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.v2018_07_01_preview.ApiErrorException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -80,7 +80,7 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -211,10 +211,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -228,7 +228,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -337,7 +337,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -436,10 +436,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java index 97530d5a5b34..e708c58e1635 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.v2018_07_01_preview.ApiErrorException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -79,7 +79,7 @@ interface WorkflowRunActionRequestHistoriesService { * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -203,10 +203,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -219,7 +219,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } @@ -322,7 +322,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ApiErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -421,10 +421,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ApiErrorException.class) .build(response); } From 557f711494fa19f0d52d9768e688b0f486d0756b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 15 Nov 2018 18:56:36 +0000 Subject: [PATCH 5/5] Generated from 91bb28bda57ea3c1098996d219975365b5499509 Use already existing error response object --- ...ctionRepetitionsRequestHistoriesInner.java | 26 +++++++++---------- ...orkflowRunActionRequestHistoriesInner.java | 26 +++++++++---------- ...ctionRepetitionsRequestHistoriesInner.java | 26 +++++++++---------- ...orkflowRunActionRequestHistoriesInner.java | 26 +++++++++---------- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index cab538353bda..e4e2f8f176a1 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -12,7 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.v2016_06_01.ApiErrorException; +import com.microsoft.azure.management.logic.v2016_06_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -80,7 +80,7 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -211,10 +211,10 @@ public Observable>> call(Response> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -228,7 +228,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -337,7 +337,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -436,10 +436,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java index fc3c04b7fba4..2d03669325ba 100644 --- a/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -12,7 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.v2016_06_01.ApiErrorException; +import com.microsoft.azure.management.logic.v2016_06_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -79,7 +79,7 @@ interface WorkflowRunActionRequestHistoriesService { * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -203,10 +203,10 @@ public Observable>> call(Response> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -219,7 +219,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -322,7 +322,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -421,10 +421,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java index ddc1ae07237b..180245f431ad 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesInner.java @@ -12,7 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.v2018_07_01_preview.ApiErrorException; +import com.microsoft.azure.management.logic.v2018_07_01_preview.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -80,7 +80,7 @@ interface WorkflowRunActionRepetitionsRequestHistoriesService { * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -211,10 +211,10 @@ public Observable>> call(Response> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -228,7 +228,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -337,7 +337,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -436,10 +436,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java index e708c58e1635..b58a9c8443f3 100644 --- a/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java +++ b/logic/resource-manager/v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesInner.java @@ -12,7 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.logic.v2018_07_01_preview.ApiErrorException; +import com.microsoft.azure.management.logic.v2018_07_01_preview.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -79,7 +79,7 @@ interface WorkflowRunActionRequestHistoriesService { * @param runName The workflow run name. * @param actionName The workflow action name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -203,10 +203,10 @@ public Observable>> call(Response> listDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -219,7 +219,7 @@ private ServiceResponse> listDelegate(Response> call(Response getDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -322,7 +322,7 @@ private ServiceResponse getDelegate(Response * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ApiErrorException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<RequestHistoryInner> object if successful. */ @@ -421,10 +421,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws ApiErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., ApiErrorException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(ApiErrorException.class) + .registerError(ErrorResponseException.class) .build(response); }