diff --git a/sdk/logic/mgmt-v2018_07_01_preview/pom.xml b/sdk/logic/mgmt-v2018_07_01_preview/pom.xml index bd29399fe209e..048d63ce9679b 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/pom.xml +++ b/sdk/logic/mgmt-v2018_07_01_preview/pom.xml @@ -11,11 +11,11 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-logic - 1.0.0-beta-1 + 1.0.0-beta jar Microsoft Azure SDK for Logic Management This package contains Microsoft Logic Management SDK. @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Workflow.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Workflow.java index c8118d963ddd7..3321ee41a76b5 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Workflow.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/Workflow.java @@ -104,7 +104,7 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { */ Observable listAsync(final String resourceGroupName, final String workflowName); + /** + * Deletes a workflow run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String workflowName, String runName); + } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAgreementsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAgreementsImpl.java index d72ddcd796169..0ce8e9ad61657 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAgreementsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAgreementsImpl.java @@ -78,10 +78,14 @@ public IntegrationAccountAgreement call(IntegrationAccountAgreementInner inner) public Observable getAsync(String resourceGroupName, String integrationAccountName, String agreementName) { IntegrationAccountAgreementsInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, agreementName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountAgreement call(IntegrationAccountAgreementInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountAgreementInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountAgreement)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAssembliesImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAssembliesImpl.java index cee6045a81caa..284bd6f73d66f 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAssembliesImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountAssembliesImpl.java @@ -77,10 +77,14 @@ public AssemblyDefinition call(AssemblyDefinitionInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { IntegrationAccountAssembliesInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, assemblyArtifactName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public AssemblyDefinition call(AssemblyDefinitionInner inner) { - return wrapModel(inner); + public Observable call(AssemblyDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((AssemblyDefinition)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountBatchConfigurationsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountBatchConfigurationsImpl.java index 1322f591403a7..4264f64b37e13 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountBatchConfigurationsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountBatchConfigurationsImpl.java @@ -64,10 +64,14 @@ public BatchConfiguration call(BatchConfigurationInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { IntegrationAccountBatchConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, batchConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public BatchConfiguration call(BatchConfigurationInner inner) { - return wrapModel(inner); + public Observable call(BatchConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BatchConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountCertificatesImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountCertificatesImpl.java index e96bcf8c80f86..e0e7c1cd44a87 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountCertificatesImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountCertificatesImpl.java @@ -64,10 +64,14 @@ public IntegrationAccountCertificate call(IntegrationAccountCertificateInner inn public Observable getAsync(String resourceGroupName, String integrationAccountName, String certificateName) { IntegrationAccountCertificatesInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, certificateName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountCertificate call(IntegrationAccountCertificateInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountCertificateInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountCertificate)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountMapsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountMapsImpl.java index 08e2eccb04ec1..3fd9f0ee53e90 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountMapsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountMapsImpl.java @@ -78,10 +78,14 @@ public IntegrationAccountMap call(IntegrationAccountMapInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String mapName) { IntegrationAccountMapsInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, mapName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountMap call(IntegrationAccountMapInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountMapInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountMap)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountPartnersImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountPartnersImpl.java index 8b08c2e950c8b..f5ea368eee9b2 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountPartnersImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountPartnersImpl.java @@ -78,10 +78,14 @@ public IntegrationAccountPartner call(IntegrationAccountPartnerInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String partnerName) { IntegrationAccountPartnersInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, partnerName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountPartner call(IntegrationAccountPartnerInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountPartnerInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountPartner)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSchemasImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSchemasImpl.java index 5682bdac041a0..5ad2746645b32 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSchemasImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSchemasImpl.java @@ -78,10 +78,14 @@ public IntegrationAccountSchema call(IntegrationAccountSchemaInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String schemaName) { IntegrationAccountSchemasInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, schemaName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountSchema call(IntegrationAccountSchemaInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountSchemaInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountSchema)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSessionsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSessionsImpl.java index 83702e1fde6f2..46220919dc253 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSessionsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/IntegrationAccountSessionsImpl.java @@ -64,10 +64,14 @@ public IntegrationAccountSession call(IntegrationAccountSessionInner inner) { public Observable getAsync(String resourceGroupName, String integrationAccountName, String sessionName) { IntegrationAccountSessionsInner client = this.inner(); return client.getAsync(resourceGroupName, integrationAccountName, sessionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public IntegrationAccountSession call(IntegrationAccountSessionInner inner) { - return wrapModel(inner); + public Observable call(IntegrationAccountSessionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((IntegrationAccountSession)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowInner.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowInner.java index dc1965467257e..3d525c155a2e8 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowInner.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowInner.java @@ -80,7 +80,9 @@ public class WorkflowInner extends Resource { private ResourceReference integrationAccount; /** - * The definition. + * The definition. See [Schema reference for Workflow Definition Language + * in Azure Logic + * Apps](https://aka.ms/logic-apps-workflow-definition-language). */ @JsonProperty(value = "properties.definition") private Object definition; @@ -197,7 +199,7 @@ public WorkflowInner withIntegrationAccount(ResourceReference integrationAccount } /** - * Get the definition. + * Get the definition. See [Schema reference for Workflow Definition Language in Azure Logic Apps](https://aka.ms/logic-apps-workflow-definition-language). * * @return the definition value */ @@ -206,7 +208,7 @@ public Object definition() { } /** - * Set the definition. + * Set the definition. See [Schema reference for Workflow Definition Language in Azure Logic Apps](https://aka.ms/logic-apps-workflow-definition-language). * * @param definition the definition value to set * @return the WorkflowInner object itself. diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsImpl.java index af9ed4f1c091d..4298f798aec83 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsImpl.java @@ -73,10 +73,14 @@ public ActionRunWorkflowWorkflowRunActionRepetitionDefinition call(WorkflowRunAc public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { WorkflowRunActionRepetitionsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ActionRunWorkflowWorkflowRunActionRepetitionDefinition call(WorkflowRunActionRepetitionDefinitionInner inner) { - return wrapModel(inner); + public Observable call(WorkflowRunActionRepetitionDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ActionRunWorkflowWorkflowRunActionRepetitionDefinition)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java index e00992df2df5e..0e6e80b7742f0 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRepetitionsRequestHistoriesImpl.java @@ -54,10 +54,14 @@ public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) 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() { + .flatMap(new Func1>() { @Override - public RepetitionActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { - return wrapModel(inner); + public Observable call(RequestHistoryInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RepetitionActionRunWorkflowRequestHistory)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java index ceded3b85eabd..5867dfd95d7f8 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionRequestHistoriesImpl.java @@ -54,10 +54,14 @@ public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { 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() { + .flatMap(new Func1>() { @Override - public ActionRunWorkflowRequestHistory call(RequestHistoryInner inner) { - return wrapModel(inner); + public Observable call(RequestHistoryInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ActionRunWorkflowRequestHistory)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionScopeRepetitionsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionScopeRepetitionsImpl.java index 1daab2ed07ecf..701dea413220f 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionScopeRepetitionsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionScopeRepetitionsImpl.java @@ -48,10 +48,14 @@ public WorkflowRunActionRepetitionDefinitionCollection call(WorkflowRunActionRep public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { WorkflowRunActionScopeRepetitionsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ActionRunWorkflowWorkflowRunActionRepetitionDefinitionModel call(WorkflowRunActionRepetitionDefinitionInner inner) { - return wrapModel(inner); + public Observable call(WorkflowRunActionRepetitionDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ActionRunWorkflowWorkflowRunActionRepetitionDefinitionModel)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionsImpl.java index a398520942427..cc94bcaf56fbe 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunActionsImpl.java @@ -74,10 +74,14 @@ public WorkflowRunAction call(WorkflowRunActionInner inner) { public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName) { WorkflowRunActionsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, actionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public WorkflowRunAction call(WorkflowRunActionInner inner) { - return wrapModel(inner); + public Observable call(WorkflowRunActionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkflowRunAction)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunOperationsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunOperationsImpl.java index 6d26a710cef60..00f669b33dcf1 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunOperationsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunOperationsImpl.java @@ -35,10 +35,14 @@ private RunWorkflowWorkflowRunImpl wrapModel(WorkflowRunInner inner) { public Observable getAsync(String resourceGroupName, String workflowName, String runName, String operationId) { WorkflowRunOperationsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName, operationId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RunWorkflowWorkflowRun call(WorkflowRunInner inner) { - return wrapModel(inner); + public Observable call(WorkflowRunInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RunWorkflowWorkflowRun)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java index b6a1bf12a6ebe..398af40ac1467 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsImpl.java @@ -11,10 +11,10 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowRuns; +import rx.Completable; import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; -import rx.Completable; import com.microsoft.azure.management.logic.v2018_07_01_preview.WorkflowWorkflowRun; class WorkflowRunsImpl extends WrapperImpl implements WorkflowRuns { @@ -61,12 +61,22 @@ public WorkflowWorkflowRun call(WorkflowRunInner inner) { public Observable getAsync(String resourceGroupName, String workflowName, String runName) { WorkflowRunsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, runName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public WorkflowWorkflowRun call(WorkflowRunInner inner) { - return wrapModel(inner); + public Observable call(WorkflowRunInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkflowWorkflowRun)wrapModel(inner)); + } } }); } + @Override + public Completable deleteAsync(String resourceGroupName, String workflowName, String runName) { + WorkflowRunsInner client = this.inner(); + return client.deleteAsync(resourceGroupName, workflowName, runName).toCompletable(); + } + } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java index 155417f9c6b2d..0f5ba74fed8c9 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowRunsInner.java @@ -24,6 +24,7 @@ import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; +import retrofit2.http.HTTP; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.Query; @@ -66,6 +67,10 @@ interface WorkflowRunsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @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.WorkflowRuns delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @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.WorkflowRuns cancel" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel") Observable> cancel(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -420,6 +425,99 @@ private ServiceResponse getDelegate(Response res .build(response); } + /** + * Deletes a workflow run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run 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 + */ + public void delete(String resourceGroupName, String workflowName, String runName) { + deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName).toBlocking().single().body(); + } + + /** + * Deletes a workflow run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run 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 deleteAsync(String resourceGroupName, String workflowName, String runName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName), serviceCallback); + } + + /** + * Deletes a workflow run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String workflowName, String runName) { + return deleteWithServiceResponseAsync(resourceGroupName, workflowName, runName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a workflow run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName) { + 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(this.client.subscriptionId(), resourceGroupName, workflowName, runName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Cancels a workflow run. * diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggerHistoriesImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggerHistoriesImpl.java index c2825d0f6a4af..8897553a573b6 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggerHistoriesImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggerHistoriesImpl.java @@ -61,10 +61,14 @@ public WorkflowTriggerHistory call(WorkflowTriggerHistoryInner inner) { public Observable getAsync(String resourceGroupName, String workflowName, String triggerName, String historyName) { WorkflowTriggerHistoriesInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, triggerName, historyName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public WorkflowTriggerHistory call(WorkflowTriggerHistoryInner inner) { - return wrapModel(inner); + public Observable call(WorkflowTriggerHistoryInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkflowTriggerHistory)wrapModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggersImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggersImpl.java index 5bc325fd90e72..cbe729056c3c1 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggersImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowTriggersImpl.java @@ -47,10 +47,14 @@ private Observable getWorkflowTriggerInnerUsingWorkflowTri public Observable getAsync(String resourceGroupName, String workflowName, String triggerName) { WorkflowTriggersInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, triggerName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public WorkflowTrigger call(WorkflowTriggerInner inner) { - return wrapWorkflowTriggerModel(inner); + public Observable call(WorkflowTriggerInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkflowTrigger)wrapWorkflowTriggerModel(inner)); + } } }); } diff --git a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowVersionsImpl.java b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowVersionsImpl.java index d050204f1280d..e95f234e156d4 100644 --- a/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowVersionsImpl.java +++ b/sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/implementation/WorkflowVersionsImpl.java @@ -54,10 +54,14 @@ public WorkflowVersion call(WorkflowVersionInner inner) { public Observable getAsync(String resourceGroupName, String workflowName, String versionId) { WorkflowVersionsInner client = this.inner(); return client.getAsync(resourceGroupName, workflowName, versionId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public WorkflowVersion call(WorkflowVersionInner inner) { - return wrapModel(inner); + public Observable call(WorkflowVersionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((WorkflowVersion)wrapModel(inner)); + } } }); }