From ec8dfc3c83b9a9060ef887ed5e3cb365fd11510c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 28 Apr 2018 00:39:54 +0000 Subject: [PATCH 01/13] Generated from 527738f72bc9c50ea2c13a04d2836ecb6a265e6b Remove validation call --- .../management/logic/AS2OneWayAgreement.java | 2 +- .../AccessKeyRegenerateActionDefinition.java | 43 ++ .../azure/management/logic/AccessKeyType.java | 56 ++ .../ArtifactContentPropertiesDefinition.java | 95 +++ .../management/logic/ArtifactProperties.java | 96 +++ .../management/logic/AssemblyProperties.java | 121 ++++ .../logic/AzureResourceErrorInfo.java | 70 +++ .../logic/BatchConfigurationProperties.java | 69 +++ .../logic/BatchReleaseCriteria.java | 95 +++ .../logic/EdifactDelimiterOverride.java | 2 +- .../logic/EdifactEnvelopeOverride.java | 2 +- .../azure/management/logic/ErrorInfo.java | 43 ++ .../azure/management/logic/ErrorResponse.java | 2 +- .../azure/management/logic/EventLevel.java | 65 +++ .../azure/management/logic/KeyVaultKey.java | 69 +++ .../logic/KeyVaultKeyAttributes.java | 95 +++ .../management/logic/KeyVaultReference.java | 16 + .../management/logic/OperationResult.java | 160 +++++ .../logic/OperationResultProperties.java | 177 ++++++ .../logic/RecurrenceScheduleOccurrence.java | 2 +- .../management/logic/RepetitionIndex.java | 69 +++ .../logic/RunActionCorrelation.java | 43 ++ .../management/logic/RunCorrelation.java | 70 +++ .../SetTriggerStateActionDefinition.java | 44 ++ .../management/logic/SigningAlgorithm.java | 60 +- .../logic/TrackEventsOperationOptions.java | 53 ++ .../azure/management/logic/TrackingEvent.java | 130 +++++ .../logic/TrackingEventErrorInfo.java | 69 +++ .../management/logic/TrackingRecordType.java | 95 +++ .../management/logic/X12OneWayAgreement.java | 2 +- .../logic/implementation/AgreementsInner.java | 106 ++++ .../AssemblyCollectionInner.java | 44 ++ .../AssemblyDefinitionInner.java | 45 ++ .../BatchConfigurationCollectionInner.java | 44 ++ .../BatchConfigurationInner.java | 45 ++ .../logic/implementation/ExpressionInner.java | 123 ++++ .../IntegrationAccountAssembliesInner.java | 548 ++++++++++++++++++ ...rationAccountBatchConfigurationsInner.java | 450 ++++++++++++++ .../IntegrationAccountsInner.java | 498 ++++++++++++++-- .../logic/implementation/JsonSchemaInner.java | 69 +++ .../KeyVaultKeyCollectionInner.java | 44 ++ .../ListKeyVaultKeysDefinitionInner.java | 70 +++ .../LogicManagementClientImpl.java | 70 +++ .../logic/implementation/MapsInner.java | 106 ++++ .../logic/implementation/PartnersInner.java | 106 ++++ .../logic/implementation/SchemasInner.java | 106 ++++ .../TrackingEventsDefinitionInner.java | 98 ++++ ...lowRunActionRepetitionDefinitionInner.java | 354 +++++++++++ .../WorkflowRunActionRepetitionsInner.java | 385 ++++++++++++ ...rkflowRunActionScopedRepetitionsInner.java | 272 +++++++++ .../WorkflowRunActionsInner.java | 106 ++++ .../WorkflowRunOperationsInner.java | 160 +++++ .../WorkflowRunPropertiesInner.java | 202 +++++++ .../implementation/WorkflowTriggersInner.java | 302 ++++++++++ .../logic/implementation/WorkflowsInner.java | 392 +++++++++++-- 55 files changed, 6505 insertions(+), 155 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyRegenerateActionDefinition.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyType.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactContentPropertiesDefinition.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactProperties.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AssemblyProperties.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AzureResourceErrorInfo.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchConfigurationProperties.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchReleaseCriteria.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorInfo.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EventLevel.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKey.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultReference.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResult.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResultProperties.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RepetitionIndex.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunActionCorrelation.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunCorrelation.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SetTriggerStateActionDefinition.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackEventsOperationOptions.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEvent.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEventErrorInfo.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingRecordType.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyCollectionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyDefinitionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationCollectionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/JsonSchemaInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ListKeyVaultKeysDefinitionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/TrackingEventsDefinitionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunPropertiesInner.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java index 1b6ad2bec86..d50442b3351 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2OneWayAgreement.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The integration account AS2 oneway agreement. + * The integration account AS2 one-way agreement. */ public class AS2OneWayAgreement { /** diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyRegenerateActionDefinition.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyRegenerateActionDefinition.java new file mode 100644 index 00000000000..43f4f55afb9 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyRegenerateActionDefinition.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AccessKeyRegenerateActionDefinition model. + */ +public class AccessKeyRegenerateActionDefinition { + /** + * Possible values include: 'NotSpecified', 'Primary', 'Secondary'. + */ + @JsonProperty(value = "keyType", required = true) + private AccessKeyType keyType; + + /** + * Get the keyType value. + * + * @return the keyType value + */ + public AccessKeyType keyType() { + return this.keyType; + } + + /** + * Set the keyType value. + * + * @param keyType the keyType value to set + * @return the AccessKeyRegenerateActionDefinition object itself. + */ + public AccessKeyRegenerateActionDefinition withKeyType(AccessKeyType keyType) { + this.keyType = keyType; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyType.java new file mode 100644 index 00000000000..42ef8fee83c --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AccessKeyType.java @@ -0,0 +1,56 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for AccessKeyType. + */ +public enum AccessKeyType { + /** Enum value NotSpecified. */ + NOT_SPECIFIED("NotSpecified"), + + /** Enum value Primary. */ + PRIMARY("Primary"), + + /** Enum value Secondary. */ + SECONDARY("Secondary"); + + /** The actual serialized value for a AccessKeyType instance. */ + private String value; + + AccessKeyType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AccessKeyType instance. + * + * @param value the serialized value to parse. + * @return the parsed AccessKeyType object, or null if unable to parse. + */ + @JsonCreator + public static AccessKeyType fromString(String value) { + AccessKeyType[] items = AccessKeyType.values(); + for (AccessKeyType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactContentPropertiesDefinition.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactContentPropertiesDefinition.java new file mode 100644 index 00000000000..a5317c5c526 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactContentPropertiesDefinition.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The artifact content properties definition. + */ +public class ArtifactContentPropertiesDefinition extends ArtifactProperties { + /** + * The content property. + */ + @JsonProperty(value = "content") + private Object content; + + /** + * The content type. + */ + @JsonProperty(value = "contentType") + private String contentType; + + /** + * The content link. + */ + @JsonProperty(value = "contentLink") + private ContentLink contentLink; + + /** + * Get the content value. + * + * @return the content value + */ + public Object content() { + return this.content; + } + + /** + * Set the content value. + * + * @param content the content value to set + * @return the ArtifactContentPropertiesDefinition object itself. + */ + public ArtifactContentPropertiesDefinition withContent(Object content) { + this.content = content; + return this; + } + + /** + * Get the contentType value. + * + * @return the contentType value + */ + public String contentType() { + return this.contentType; + } + + /** + * Set the contentType value. + * + * @param contentType the contentType value to set + * @return the ArtifactContentPropertiesDefinition object itself. + */ + public ArtifactContentPropertiesDefinition withContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the contentLink value. + * + * @return the contentLink value + */ + public ContentLink contentLink() { + return this.contentLink; + } + + /** + * Set the contentLink value. + * + * @param contentLink the contentLink value to set + * @return the ArtifactContentPropertiesDefinition object itself. + */ + public ArtifactContentPropertiesDefinition withContentLink(ContentLink contentLink) { + this.contentLink = contentLink; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactProperties.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactProperties.java new file mode 100644 index 00000000000..0761c6c11f8 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ArtifactProperties.java @@ -0,0 +1,96 @@ +/** + * 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; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The artifact properties definition. + */ +public class ArtifactProperties { + /** + * The artifact creation time. + */ + @JsonProperty(value = "createdTime") + private DateTime createdTime; + + /** + * The artifact changed time. + */ + @JsonProperty(value = "changedTime") + private DateTime changedTime; + + /** + * The metadata property. + */ + @JsonProperty(value = "metadata") + private Object metadata; + + /** + * Get the createdTime value. + * + * @return the createdTime value + */ + public DateTime createdTime() { + return this.createdTime; + } + + /** + * Set the createdTime value. + * + * @param createdTime the createdTime value to set + * @return the ArtifactProperties object itself. + */ + public ArtifactProperties withCreatedTime(DateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get the changedTime value. + * + * @return the changedTime value + */ + public DateTime changedTime() { + return this.changedTime; + } + + /** + * Set the changedTime value. + * + * @param changedTime the changedTime value to set + * @return the ArtifactProperties object itself. + */ + public ArtifactProperties withChangedTime(DateTime changedTime) { + this.changedTime = changedTime; + return this; + } + + /** + * Get the metadata value. + * + * @return the metadata value + */ + public Object metadata() { + return this.metadata; + } + + /** + * Set the metadata value. + * + * @param metadata the metadata value to set + * @return the ArtifactProperties object itself. + */ + public ArtifactProperties withMetadata(Object metadata) { + this.metadata = metadata; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AssemblyProperties.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AssemblyProperties.java new file mode 100644 index 00000000000..a2f47d4d033 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AssemblyProperties.java @@ -0,0 +1,121 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The assembly properties definition. + */ +public class AssemblyProperties extends ArtifactContentPropertiesDefinition { + /** + * The assembly name. + */ + @JsonProperty(value = "assemblyName", required = true) + private String assemblyName; + + /** + * The assembly version. + */ + @JsonProperty(value = "assemblyVersion") + private String assemblyVersion; + + /** + * The assembly culture. + */ + @JsonProperty(value = "assemblyCulture") + private String assemblyCulture; + + /** + * The assembly public key token. + */ + @JsonProperty(value = "assemblyPublicKeyToken") + private String assemblyPublicKeyToken; + + /** + * Get the assemblyName value. + * + * @return the assemblyName value + */ + public String assemblyName() { + return this.assemblyName; + } + + /** + * Set the assemblyName value. + * + * @param assemblyName the assemblyName value to set + * @return the AssemblyProperties object itself. + */ + public AssemblyProperties withAssemblyName(String assemblyName) { + this.assemblyName = assemblyName; + return this; + } + + /** + * Get the assemblyVersion value. + * + * @return the assemblyVersion value + */ + public String assemblyVersion() { + return this.assemblyVersion; + } + + /** + * Set the assemblyVersion value. + * + * @param assemblyVersion the assemblyVersion value to set + * @return the AssemblyProperties object itself. + */ + public AssemblyProperties withAssemblyVersion(String assemblyVersion) { + this.assemblyVersion = assemblyVersion; + return this; + } + + /** + * Get the assemblyCulture value. + * + * @return the assemblyCulture value + */ + public String assemblyCulture() { + return this.assemblyCulture; + } + + /** + * Set the assemblyCulture value. + * + * @param assemblyCulture the assemblyCulture value to set + * @return the AssemblyProperties object itself. + */ + public AssemblyProperties withAssemblyCulture(String assemblyCulture) { + this.assemblyCulture = assemblyCulture; + return this; + } + + /** + * Get the assemblyPublicKeyToken value. + * + * @return the assemblyPublicKeyToken value + */ + public String assemblyPublicKeyToken() { + return this.assemblyPublicKeyToken; + } + + /** + * Set the assemblyPublicKeyToken value. + * + * @param assemblyPublicKeyToken the assemblyPublicKeyToken value to set + * @return the AssemblyProperties object itself. + */ + public AssemblyProperties withAssemblyPublicKeyToken(String assemblyPublicKeyToken) { + this.assemblyPublicKeyToken = assemblyPublicKeyToken; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AzureResourceErrorInfo.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AzureResourceErrorInfo.java new file mode 100644 index 00000000000..a6e4ad85249 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AzureResourceErrorInfo.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; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The azure resource error info. + */ +public class AzureResourceErrorInfo extends ErrorInfo { + /** + * The error message. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * The error details. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the AzureResourceErrorInfo object itself. + */ + public AzureResourceErrorInfo withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the details value. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set the details value. + * + * @param details the details value to set + * @return the AzureResourceErrorInfo object itself. + */ + public AzureResourceErrorInfo withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchConfigurationProperties.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchConfigurationProperties.java new file mode 100644 index 00000000000..c57885cbec1 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchConfigurationProperties.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The batch configuration properties definition. + */ +public class BatchConfigurationProperties extends ArtifactProperties { + /** + * The name of the batch group. + */ + @JsonProperty(value = "batchGroupName", required = true) + private String batchGroupName; + + /** + * The batch release criteria. + */ + @JsonProperty(value = "releaseCriteria", required = true) + private BatchReleaseCriteria releaseCriteria; + + /** + * Get the batchGroupName value. + * + * @return the batchGroupName value + */ + public String batchGroupName() { + return this.batchGroupName; + } + + /** + * Set the batchGroupName value. + * + * @param batchGroupName the batchGroupName value to set + * @return the BatchConfigurationProperties object itself. + */ + public BatchConfigurationProperties withBatchGroupName(String batchGroupName) { + this.batchGroupName = batchGroupName; + return this; + } + + /** + * Get the releaseCriteria value. + * + * @return the releaseCriteria value + */ + public BatchReleaseCriteria releaseCriteria() { + return this.releaseCriteria; + } + + /** + * Set the releaseCriteria value. + * + * @param releaseCriteria the releaseCriteria value to set + * @return the BatchConfigurationProperties object itself. + */ + public BatchConfigurationProperties withReleaseCriteria(BatchReleaseCriteria releaseCriteria) { + this.releaseCriteria = releaseCriteria; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchReleaseCriteria.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchReleaseCriteria.java new file mode 100644 index 00000000000..b3a26fb109d --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/BatchReleaseCriteria.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The batch release criteria. + */ +public class BatchReleaseCriteria { + /** + * The message count. + */ + @JsonProperty(value = "messageCount") + private Integer messageCount; + + /** + * The batch size in bytes. + */ + @JsonProperty(value = "batchSize") + private Integer batchSize; + + /** + * The recurrence. + */ + @JsonProperty(value = "recurrence") + private WorkflowTriggerRecurrence recurrence; + + /** + * Get the messageCount value. + * + * @return the messageCount value + */ + public Integer messageCount() { + return this.messageCount; + } + + /** + * Set the messageCount value. + * + * @param messageCount the messageCount value to set + * @return the BatchReleaseCriteria object itself. + */ + public BatchReleaseCriteria withMessageCount(Integer messageCount) { + this.messageCount = messageCount; + return this; + } + + /** + * Get the batchSize value. + * + * @return the batchSize value + */ + public Integer batchSize() { + return this.batchSize; + } + + /** + * Set the batchSize value. + * + * @param batchSize the batchSize value to set + * @return the BatchReleaseCriteria object itself. + */ + public BatchReleaseCriteria withBatchSize(Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Get the recurrence value. + * + * @return the recurrence value + */ + public WorkflowTriggerRecurrence recurrence() { + return this.recurrence; + } + + /** + * Set the recurrence value. + * + * @param recurrence the recurrence value to set + * @return the BatchReleaseCriteria object itself. + */ + public BatchReleaseCriteria withRecurrence(WorkflowTriggerRecurrence recurrence) { + this.recurrence = recurrence; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java index d51fe09cac9..82fd43ea06a 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactDelimiterOverride.java @@ -27,7 +27,7 @@ public class EdifactDelimiterOverride { private String messageVersion; /** - * The message releaseversion. + * The message release. */ @JsonProperty(value = "messageRelease") private String messageRelease; diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java index 58709698384..1976a8733ba 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EdifactEnvelopeOverride.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The Edifact enevlope override settings. + * The Edifact envelope override settings. */ public class EdifactEnvelopeOverride { /** diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorInfo.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorInfo.java new file mode 100644 index 00000000000..0215799b356 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorInfo.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error info. + */ +public class ErrorInfo { + /** + * The error code. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the ErrorInfo object itself. + */ + public ErrorInfo withCode(String code) { + this.code = code; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java index 78eaa5bc046..30cd97be3ff 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ErrorResponse.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Error reponse indicates Logic service is not able to process the incoming + * Error response indicates Logic service is not able to process the incoming * request. The error property contains the error details. */ public class ErrorResponse { diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EventLevel.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EventLevel.java new file mode 100644 index 00000000000..834a6eb70de --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/EventLevel.java @@ -0,0 +1,65 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for EventLevel. + */ +public enum EventLevel { + /** Enum value LogAlways. */ + LOG_ALWAYS("LogAlways"), + + /** Enum value Critical. */ + CRITICAL("Critical"), + + /** Enum value Error. */ + ERROR("Error"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Informational. */ + INFORMATIONAL("Informational"), + + /** Enum value Verbose. */ + VERBOSE("Verbose"); + + /** The actual serialized value for a EventLevel instance. */ + private String value; + + EventLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a EventLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed EventLevel object, or null if unable to parse. + */ + @JsonCreator + public static EventLevel fromString(String value) { + EventLevel[] items = EventLevel.values(); + for (EventLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKey.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKey.java new file mode 100644 index 00000000000..579da30b616 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKey.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key vault key. + */ +public class KeyVaultKey { + /** + * The key id. + */ + @JsonProperty(value = "kid") + private String kid; + + /** + * The key attributes. + */ + @JsonProperty(value = "attributes") + private KeyVaultKeyAttributes attributes; + + /** + * Get the kid value. + * + * @return the kid value + */ + public String kid() { + return this.kid; + } + + /** + * Set the kid value. + * + * @param kid the kid value to set + * @return the KeyVaultKey object itself. + */ + public KeyVaultKey withKid(String kid) { + this.kid = kid; + return this; + } + + /** + * Get the attributes value. + * + * @return the attributes value + */ + public KeyVaultKeyAttributes attributes() { + return this.attributes; + } + + /** + * Set the attributes value. + * + * @param attributes the attributes value to set + * @return the KeyVaultKey object itself. + */ + public KeyVaultKey withAttributes(KeyVaultKeyAttributes attributes) { + this.attributes = attributes; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java new file mode 100644 index 00000000000..de78d7e4aca --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key attributes. + */ +public class KeyVaultKeyAttributes { + /** + * Whether the key is enabled or not. + */ + @JsonProperty(value = "enabled") + private String enabled; + + /** + * When the key was created. + */ + @JsonProperty(value = "created") + private Long created; + + /** + * When the key was updated. + */ + @JsonProperty(value = "updated") + private Long updated; + + /** + * Get the enabled value. + * + * @return the enabled value + */ + public String enabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + * @return the KeyVaultKeyAttributes object itself. + */ + public KeyVaultKeyAttributes withEnabled(String enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the created value. + * + * @return the created value + */ + public Long created() { + return this.created; + } + + /** + * Set the created value. + * + * @param created the created value to set + * @return the KeyVaultKeyAttributes object itself. + */ + public KeyVaultKeyAttributes withCreated(Long created) { + this.created = created; + return this; + } + + /** + * Get the updated value. + * + * @return the updated value + */ + public Long updated() { + return this.updated; + } + + /** + * Set the updated value. + * + * @param updated the updated value to set + * @return the KeyVaultKeyAttributes object itself. + */ + public KeyVaultKeyAttributes withUpdated(Long updated) { + this.updated = updated; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultReference.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultReference.java new file mode 100644 index 00000000000..279fea888f3 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultReference.java @@ -0,0 +1,16 @@ +/** + * 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; + + +/** + * The key vault reference. + */ +public class KeyVaultReference extends ResourceReference { +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResult.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResult.java new file mode 100644 index 00000000000..518e9aa92c7 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResult.java @@ -0,0 +1,160 @@ +/** + * 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; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The operation result definition. + */ +public class OperationResult extends OperationResultProperties { + /** + * Gets the tracking id. + */ + @JsonProperty(value = "trackingId", access = JsonProperty.Access.WRITE_ONLY) + private String trackingId; + + /** + * Gets the inputs. + */ + @JsonProperty(value = "inputs", access = JsonProperty.Access.WRITE_ONLY) + private Object inputs; + + /** + * Gets the link to inputs. + */ + @JsonProperty(value = "inputsLink", access = JsonProperty.Access.WRITE_ONLY) + private ContentLink inputsLink; + + /** + * Gets the outputs. + */ + @JsonProperty(value = "outputs", access = JsonProperty.Access.WRITE_ONLY) + private Object outputs; + + /** + * Gets the link to outputs. + */ + @JsonProperty(value = "outputsLink", access = JsonProperty.Access.WRITE_ONLY) + private ContentLink outputsLink; + + /** + * Gets the tracked properties. + */ + @JsonProperty(value = "trackedProperties", access = JsonProperty.Access.WRITE_ONLY) + private Object trackedProperties; + + /** + * Gets the retry histories. + */ + @JsonProperty(value = "retryHistory") + private List retryHistory; + + /** + * The iterationCount property. + */ + @JsonProperty(value = "iterationCount") + private Integer iterationCount; + + /** + * Get the trackingId value. + * + * @return the trackingId value + */ + public String trackingId() { + return this.trackingId; + } + + /** + * Get the inputs value. + * + * @return the inputs value + */ + public Object inputs() { + return this.inputs; + } + + /** + * Get the inputsLink value. + * + * @return the inputsLink value + */ + public ContentLink inputsLink() { + return this.inputsLink; + } + + /** + * Get the outputs value. + * + * @return the outputs value + */ + public Object outputs() { + return this.outputs; + } + + /** + * Get the outputsLink value. + * + * @return the outputsLink value + */ + public ContentLink outputsLink() { + return this.outputsLink; + } + + /** + * Get the trackedProperties value. + * + * @return the trackedProperties value + */ + public Object trackedProperties() { + return this.trackedProperties; + } + + /** + * Get the retryHistory value. + * + * @return the retryHistory value + */ + public List retryHistory() { + return this.retryHistory; + } + + /** + * Set the retryHistory value. + * + * @param retryHistory the retryHistory value to set + * @return the OperationResult object itself. + */ + public OperationResult withRetryHistory(List retryHistory) { + this.retryHistory = retryHistory; + return this; + } + + /** + * Get the iterationCount value. + * + * @return the iterationCount value + */ + public Integer iterationCount() { + return this.iterationCount; + } + + /** + * Set the iterationCount value. + * + * @param iterationCount the iterationCount value to set + * @return the OperationResult object itself. + */ + public OperationResult withIterationCount(Integer iterationCount) { + this.iterationCount = iterationCount; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResultProperties.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResultProperties.java new file mode 100644 index 00000000000..75a30bae008 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/OperationResultProperties.java @@ -0,0 +1,177 @@ +/** + * 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; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The run operation result properties. + */ +public class OperationResultProperties { + /** + * The start time of the workflow scope repetition. + */ + @JsonProperty(value = "startTime") + private DateTime startTime; + + /** + * The end time of the workflow scope repetition. + */ + @JsonProperty(value = "endTime") + private DateTime endTime; + + /** + * The correlation properties. + */ + @JsonProperty(value = "correlation") + private RunActionCorrelation correlation; + + /** + * The status of the workflow scope repetition. Possible values include: + * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored'. + */ + @JsonProperty(value = "status") + private WorkflowStatus status; + + /** + * The workflow scope repetition code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * The error property. + */ + @JsonProperty(value = "error") + private Object error; + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime value. + * + * @param endTime the endTime value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the correlation value. + * + * @return the correlation value + */ + public RunActionCorrelation correlation() { + return this.correlation; + } + + /** + * Set the correlation value. + * + * @param correlation the correlation value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withCorrelation(RunActionCorrelation correlation) { + this.correlation = correlation; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public WorkflowStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withStatus(WorkflowStatus status) { + this.status = status; + return this; + } + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public Object error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the OperationResultProperties object itself. + */ + public OperationResultProperties withError(Object error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java index d160d74bfab..af82a75fe44 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RecurrenceScheduleOccurrence.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The recurrence schedule occurence. + * The recurrence schedule occurrence. */ public class RecurrenceScheduleOccurrence { /** diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RepetitionIndex.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RepetitionIndex.java new file mode 100644 index 00000000000..02007700fe9 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RepetitionIndex.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The workflow run action repetition index. + */ +public class RepetitionIndex { + /** + * The scope. + */ + @JsonProperty(value = "scopeName") + private String scopeName; + + /** + * The index. + */ + @JsonProperty(value = "itemIndex", required = true) + private int itemIndex; + + /** + * Get the scopeName value. + * + * @return the scopeName value + */ + public String scopeName() { + return this.scopeName; + } + + /** + * Set the scopeName value. + * + * @param scopeName the scopeName value to set + * @return the RepetitionIndex object itself. + */ + public RepetitionIndex withScopeName(String scopeName) { + this.scopeName = scopeName; + return this; + } + + /** + * Get the itemIndex value. + * + * @return the itemIndex value + */ + public int itemIndex() { + return this.itemIndex; + } + + /** + * Set the itemIndex value. + * + * @param itemIndex the itemIndex value to set + * @return the RepetitionIndex object itself. + */ + public RepetitionIndex withItemIndex(int itemIndex) { + this.itemIndex = itemIndex; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunActionCorrelation.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunActionCorrelation.java new file mode 100644 index 00000000000..f74a012b1f3 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunActionCorrelation.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The workflow run action correlation properties. + */ +public class RunActionCorrelation extends RunCorrelation { + /** + * The action tracking identifier. + */ + @JsonProperty(value = "actionTrackingId") + private String actionTrackingId; + + /** + * Get the actionTrackingId value. + * + * @return the actionTrackingId value + */ + public String actionTrackingId() { + return this.actionTrackingId; + } + + /** + * Set the actionTrackingId value. + * + * @param actionTrackingId the actionTrackingId value to set + * @return the RunActionCorrelation object itself. + */ + public RunActionCorrelation withActionTrackingId(String actionTrackingId) { + this.actionTrackingId = actionTrackingId; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunCorrelation.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunCorrelation.java new file mode 100644 index 00000000000..ce75f003ebf --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/RunCorrelation.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; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The correlation properties. + */ +public class RunCorrelation { + /** + * The client tracking identifier. + */ + @JsonProperty(value = "clientTrackingId") + private String clientTrackingId; + + /** + * The client keywords. + */ + @JsonProperty(value = "clientKeywords") + private List clientKeywords; + + /** + * Get the clientTrackingId value. + * + * @return the clientTrackingId value + */ + public String clientTrackingId() { + return this.clientTrackingId; + } + + /** + * Set the clientTrackingId value. + * + * @param clientTrackingId the clientTrackingId value to set + * @return the RunCorrelation object itself. + */ + public RunCorrelation withClientTrackingId(String clientTrackingId) { + this.clientTrackingId = clientTrackingId; + return this; + } + + /** + * Get the clientKeywords value. + * + * @return the clientKeywords value + */ + public List clientKeywords() { + return this.clientKeywords; + } + + /** + * Set the clientKeywords value. + * + * @param clientKeywords the clientKeywords value to set + * @return the RunCorrelation object itself. + */ + public RunCorrelation withClientKeywords(List clientKeywords) { + this.clientKeywords = clientKeywords; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SetTriggerStateActionDefinition.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SetTriggerStateActionDefinition.java new file mode 100644 index 00000000000..f4fee188275 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SetTriggerStateActionDefinition.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; + +import com.microsoft.azure.management.logic.implementation.WorkflowTriggerInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SetTriggerStateActionDefinition model. + */ +public class SetTriggerStateActionDefinition { + /** + * The source property. + */ + @JsonProperty(value = "source", required = true) + private WorkflowTriggerInner source; + + /** + * Get the source value. + * + * @return the source value + */ + public WorkflowTriggerInner source() { + return this.source; + } + + /** + * Set the source value. + * + * @param source the source value to set + * @return the SetTriggerStateActionDefinition object itself. + */ + public SetTriggerStateActionDefinition withSource(WorkflowTriggerInner source) { + this.source = source; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java index 6cf43b93dc0..eee35b4f05d 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/SigningAlgorithm.java @@ -8,64 +8,46 @@ package com.microsoft.azure.management.logic; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SigningAlgorithm. */ -public final class SigningAlgorithm { +public final class SigningAlgorithm extends ExpandableStringEnum { /** Static value NotSpecified for SigningAlgorithm. */ - public static final SigningAlgorithm NOT_SPECIFIED = new SigningAlgorithm("NotSpecified"); + public static final SigningAlgorithm NOT_SPECIFIED = fromString("NotSpecified"); /** Static value Default for SigningAlgorithm. */ - public static final SigningAlgorithm DEFAULT = new SigningAlgorithm("Default"); + public static final SigningAlgorithm DEFAULT = fromString("Default"); /** Static value SHA1 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA1 = new SigningAlgorithm("SHA1"); + public static final SigningAlgorithm SHA1 = fromString("SHA1"); /** Static value SHA2256 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2256 = new SigningAlgorithm("SHA2256"); + public static final SigningAlgorithm SHA2256 = fromString("SHA2256"); /** Static value SHA2384 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2384 = new SigningAlgorithm("SHA2384"); + public static final SigningAlgorithm SHA2384 = fromString("SHA2384"); /** Static value SHA2512 for SigningAlgorithm. */ - public static final SigningAlgorithm SHA2512 = new SigningAlgorithm("SHA2512"); - - private String value; + public static final SigningAlgorithm SHA2512 = fromString("SHA2512"); /** - * Creates a custom value for SigningAlgorithm. - * @param value the custom value + * Creates or finds a SigningAlgorithm from its string representation. + * @param name a name to look for + * @return the corresponding SigningAlgorithm */ - public SigningAlgorithm(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SigningAlgorithm fromString(String name) { + return fromString(name, SigningAlgorithm.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SigningAlgorithm)) { - return false; - } - if (obj == this) { - return true; - } - SigningAlgorithm rhs = (SigningAlgorithm) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known SigningAlgorithm values + */ + public static Collection values() { + return values(SigningAlgorithm.class); } } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackEventsOperationOptions.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackEventsOperationOptions.java new file mode 100644 index 00000000000..6b964054271 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackEventsOperationOptions.java @@ -0,0 +1,53 @@ +/** + * 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; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TrackEventsOperationOptions. + */ +public enum TrackEventsOperationOptions { + /** Enum value None. */ + NONE("None"), + + /** Enum value DisableSourceInfoEnrich. */ + DISABLE_SOURCE_INFO_ENRICH("DisableSourceInfoEnrich"); + + /** The actual serialized value for a TrackEventsOperationOptions instance. */ + private String value; + + TrackEventsOperationOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TrackEventsOperationOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed TrackEventsOperationOptions object, or null if unable to parse. + */ + @JsonCreator + public static TrackEventsOperationOptions fromString(String value) { + TrackEventsOperationOptions[] items = TrackEventsOperationOptions.values(); + for (TrackEventsOperationOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEvent.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEvent.java new file mode 100644 index 00000000000..25326d0f4a1 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEvent.java @@ -0,0 +1,130 @@ +/** + * 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; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The TrackingEvent model. + */ +public class TrackingEvent { + /** + * Possible values include: 'LogAlways', 'Critical', 'Error', 'Warning', + * 'Informational', 'Verbose'. + */ + @JsonProperty(value = "eventLevel", required = true) + private EventLevel eventLevel; + + /** + * The eventTime property. + */ + @JsonProperty(value = "eventTime", required = true) + private DateTime eventTime; + + /** + * Possible values include: 'NotSpecified', 'Custom', 'AS2Message', + * 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', 'X12TransactionSet', + * 'X12InterchangeAcknowledgment', 'X12FunctionalGroupAcknowledgment', + * 'X12TransactionSetAcknowledgment', 'EdifactInterchange', + * 'EdifactFunctionalGroup', 'EdifactTransactionSet', + * 'EdifactInterchangeAcknowledgment', + * 'EdifactFunctionalGroupAcknowledgment', + * 'EdifactTransactionSetAcknowledgment'. + */ + @JsonProperty(value = "recordType", required = true) + private TrackingRecordType recordType; + + /** + * The error property. + */ + @JsonProperty(value = "error") + private TrackingEventErrorInfo error; + + /** + * Get the eventLevel value. + * + * @return the eventLevel value + */ + public EventLevel eventLevel() { + return this.eventLevel; + } + + /** + * Set the eventLevel value. + * + * @param eventLevel the eventLevel value to set + * @return the TrackingEvent object itself. + */ + public TrackingEvent withEventLevel(EventLevel eventLevel) { + this.eventLevel = eventLevel; + return this; + } + + /** + * Get the eventTime value. + * + * @return the eventTime value + */ + public DateTime eventTime() { + return this.eventTime; + } + + /** + * Set the eventTime value. + * + * @param eventTime the eventTime value to set + * @return the TrackingEvent object itself. + */ + public TrackingEvent withEventTime(DateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Get the recordType value. + * + * @return the recordType value + */ + public TrackingRecordType recordType() { + return this.recordType; + } + + /** + * Set the recordType value. + * + * @param recordType the recordType value to set + * @return the TrackingEvent object itself. + */ + public TrackingEvent withRecordType(TrackingRecordType recordType) { + this.recordType = recordType; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public TrackingEventErrorInfo error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the TrackingEvent object itself. + */ + public TrackingEvent withError(TrackingEventErrorInfo error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEventErrorInfo.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEventErrorInfo.java new file mode 100644 index 00000000000..079a59216ee --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingEventErrorInfo.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The TrackingEventErrorInfo model. + */ +public class TrackingEventErrorInfo { + /** + * The message property. + */ + @JsonProperty(value = "message") + private String message; + + /** + * The code property. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the TrackingEventErrorInfo object itself. + */ + public TrackingEventErrorInfo withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the TrackingEventErrorInfo object itself. + */ + public TrackingEventErrorInfo withCode(String code) { + this.code = code; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingRecordType.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingRecordType.java new file mode 100644 index 00000000000..9c950788885 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/TrackingRecordType.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; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for TrackingRecordType. + */ +public enum TrackingRecordType { + /** Enum value NotSpecified. */ + NOT_SPECIFIED("NotSpecified"), + + /** Enum value Custom. */ + CUSTOM("Custom"), + + /** Enum value AS2Message. */ + AS2MESSAGE("AS2Message"), + + /** Enum value AS2MDN. */ + AS2MDN("AS2MDN"), + + /** Enum value X12Interchange. */ + X12INTERCHANGE("X12Interchange"), + + /** Enum value X12FunctionalGroup. */ + X12FUNCTIONAL_GROUP("X12FunctionalGroup"), + + /** Enum value X12TransactionSet. */ + X12TRANSACTION_SET("X12TransactionSet"), + + /** Enum value X12InterchangeAcknowledgment. */ + X12INTERCHANGE_ACKNOWLEDGMENT("X12InterchangeAcknowledgment"), + + /** Enum value X12FunctionalGroupAcknowledgment. */ + X12FUNCTIONAL_GROUP_ACKNOWLEDGMENT("X12FunctionalGroupAcknowledgment"), + + /** Enum value X12TransactionSetAcknowledgment. */ + X12TRANSACTION_SET_ACKNOWLEDGMENT("X12TransactionSetAcknowledgment"), + + /** Enum value EdifactInterchange. */ + EDIFACT_INTERCHANGE("EdifactInterchange"), + + /** Enum value EdifactFunctionalGroup. */ + EDIFACT_FUNCTIONAL_GROUP("EdifactFunctionalGroup"), + + /** Enum value EdifactTransactionSet. */ + EDIFACT_TRANSACTION_SET("EdifactTransactionSet"), + + /** Enum value EdifactInterchangeAcknowledgment. */ + EDIFACT_INTERCHANGE_ACKNOWLEDGMENT("EdifactInterchangeAcknowledgment"), + + /** Enum value EdifactFunctionalGroupAcknowledgment. */ + EDIFACT_FUNCTIONAL_GROUP_ACKNOWLEDGMENT("EdifactFunctionalGroupAcknowledgment"), + + /** Enum value EdifactTransactionSetAcknowledgment. */ + EDIFACT_TRANSACTION_SET_ACKNOWLEDGMENT("EdifactTransactionSetAcknowledgment"); + + /** The actual serialized value for a TrackingRecordType instance. */ + private String value; + + TrackingRecordType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TrackingRecordType instance. + * + * @param value the serialized value to parse. + * @return the parsed TrackingRecordType object, or null if unable to parse. + */ + @JsonCreator + public static TrackingRecordType fromString(String value) { + TrackingRecordType[] items = TrackingRecordType.values(); + for (TrackingRecordType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java index 827d6dadc57..0ecc502d851 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/X12OneWayAgreement.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The X12 oneway agreement. + * The X12 one-way agreement. */ public class X12OneWayAgreement { /** diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java index 65862e62045..edb3a29840e 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java @@ -28,6 +28,7 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; @@ -77,6 +78,10 @@ interface AgreementsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("agreementName") String agreementName, @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.Agreements listContentCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl") + Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("agreementName") String agreementName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner listContentCallbackUrl, @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.Agreements listByIntegrationAccountsNext" }) @GET Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -622,6 +627,107 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param agreementName The integration account agreement name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 WorkflowTriggerCallbackUrlInner object if successful. + */ + public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrl).toBlocking().single().body(); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param agreementName The integration account agreement name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParametersInner listContentCallbackUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrl), serviceCallback); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param agreementName The integration account agreement name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrl).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param agreementName The integration account agreement name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listContentCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParametersInner listContentCallbackUrl) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (agreementName == null) { + throw new IllegalArgumentException("Parameter agreementName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (listContentCallbackUrl == null) { + throw new IllegalArgumentException("Parameter listContentCallbackUrl is required and cannot be null."); + } + Validator.validate(listContentCallbackUrl); + return service.listContentCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, agreementName, this.client.apiVersion(), listContentCallbackUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listContentCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listContentCallbackUrlDelegate(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 list of integration account agreements. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyCollectionInner.java new file mode 100644 index 00000000000..33cb40f0d97 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyCollectionInner.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.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of assembly definitions. + */ +public class AssemblyCollectionInner { + /** + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the AssemblyCollectionInner object itself. + */ + public AssemblyCollectionInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyDefinitionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyDefinitionInner.java new file mode 100644 index 00000000000..aee81e80130 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AssemblyDefinitionInner.java @@ -0,0 +1,45 @@ +/** + * 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.implementation; + +import com.microsoft.azure.management.logic.AssemblyProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Resource; + +/** + * The assembly definition. + */ +public class AssemblyDefinitionInner extends Resource { + /** + * The assembly properties. + */ + @JsonProperty(value = "properties", required = true) + private AssemblyProperties properties; + + /** + * Get the properties value. + * + * @return the properties value + */ + public AssemblyProperties properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the AssemblyDefinitionInner object itself. + */ + public AssemblyDefinitionInner withProperties(AssemblyProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationCollectionInner.java new file mode 100644 index 00000000000..d6ef8e4b9cd --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationCollectionInner.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.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of batch configurations. + */ +public class BatchConfigurationCollectionInner { + /** + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the BatchConfigurationCollectionInner object itself. + */ + public BatchConfigurationCollectionInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationInner.java new file mode 100644 index 00000000000..efa6b84c9ad --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/BatchConfigurationInner.java @@ -0,0 +1,45 @@ +/** + * 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.implementation; + +import com.microsoft.azure.management.logic.BatchConfigurationProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Resource; + +/** + * The batch configuration resource definition. + */ +public class BatchConfigurationInner extends Resource { + /** + * The batch configuration properties. + */ + @JsonProperty(value = "properties", required = true) + private BatchConfigurationProperties properties; + + /** + * Get the properties value. + * + * @return the properties value + */ + public BatchConfigurationProperties properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the BatchConfigurationInner object itself. + */ + public BatchConfigurationInner withProperties(BatchConfigurationProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionInner.java new file mode 100644 index 00000000000..932808b75fb --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionInner.java @@ -0,0 +1,123 @@ +/** + * 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.implementation; + +import java.util.List; +import com.microsoft.azure.management.logic.AzureResourceErrorInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ExpressionInner model. + */ +public class ExpressionInner { + /** + * The text property. + */ + @JsonProperty(value = "text") + private String text; + + /** + * The value property. + */ + @JsonProperty(value = "value") + private Object value; + + /** + * The subexpressions property. + */ + @JsonProperty(value = "subexpressions") + private List subexpressions; + + /** + * The error property. + */ + @JsonProperty(value = "error") + private AzureResourceErrorInfo error; + + /** + * Get the text value. + * + * @return the text value + */ + public String text() { + return this.text; + } + + /** + * Set the text value. + * + * @param text the text value to set + * @return the ExpressionInner object itself. + */ + public ExpressionInner withText(String text) { + this.text = text; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the ExpressionInner object itself. + */ + public ExpressionInner withValue(Object value) { + this.value = value; + return this; + } + + /** + * Get the subexpressions value. + * + * @return the subexpressions value + */ + public List subexpressions() { + return this.subexpressions; + } + + /** + * Set the subexpressions value. + * + * @param subexpressions the subexpressions value to set + * @return the ExpressionInner object itself. + */ + public ExpressionInner withSubexpressions(List subexpressions) { + this.subexpressions = subexpressions; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public AzureResourceErrorInfo error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ExpressionInner object itself. + */ + public ExpressionInner withError(AzureResourceErrorInfo error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java new file mode 100644 index 00000000000..5e5c8ae5a2c --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java @@ -0,0 +1,548 @@ +/** + * 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.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 com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +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.PUT; +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 IntegrationAccountAssemblies. + */ +public class IntegrationAccountAssembliesInner { + /** The Retrofit service to perform REST calls. */ + private IntegrationAccountAssembliesService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of IntegrationAccountAssembliesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public IntegrationAccountAssembliesInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(IntegrationAccountAssembliesService.class); + this.client = client; + } + + /** + * The interface defining all the services for IntegrationAccountAssemblies to be + * used by Retrofit to perform actually REST calls. + */ + interface IntegrationAccountAssembliesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccountAssemblies list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @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.IntegrationAccountAssemblies get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @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.IntegrationAccountAssemblies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @Body AssemblyDefinitionInner assemblyArtifact, @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.IntegrationAccountAssemblies delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @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.IntegrationAccountAssemblies listContentCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl") + Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List the assemblies for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 AssemblyCollectionInner object if successful. + */ + public AssemblyCollectionInner list(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); + } + + /** + * List the assemblies for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 integrationAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); + } + + /** + * List the assemblies for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyCollectionInner object + */ + public Observable listAsync(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, AssemblyCollectionInner>() { + @Override + public AssemblyCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List the assemblies for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyCollectionInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName 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, integrationAccountName, 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); + } + + /** + * Get an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 AssemblyDefinitionInner object if successful. + */ + public AssemblyDefinitionInner get(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).toBlocking().single().body(); + } + + /** + * Get an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 integrationAccountName, String assemblyArtifactName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName), serviceCallback); + } + + /** + * Get an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyDefinitionInner object + */ + public Observable getAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).map(new Func1, AssemblyDefinitionInner>() { + @Override + public AssemblyDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyDefinitionInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (assemblyArtifactName == null) { + throw new IllegalArgumentException("Parameter assemblyArtifactName 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, integrationAccountName, assemblyArtifactName, 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); + } + + /** + * Create or update an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @param assemblyArtifact The assembly artifact. + * @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 AssemblyDefinitionInner object if successful. + */ + public AssemblyDefinitionInner createOrUpdate(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact).toBlocking().single().body(); + } + + /** + * Create or update an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @param assemblyArtifact The assembly artifact. + * @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 createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact), serviceCallback); + } + + /** + * Create or update an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @param assemblyArtifact The assembly artifact. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyDefinitionInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact).map(new Func1, AssemblyDefinitionInner>() { + @Override + public AssemblyDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @param assemblyArtifact The assembly artifact. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AssemblyDefinitionInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, AssemblyDefinitionInner assemblyArtifact) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (assemblyArtifactName == null) { + throw new IllegalArgumentException("Parameter assemblyArtifactName is required and cannot be null."); + } + if (assemblyArtifact == null) { + throw new IllegalArgumentException("Parameter assemblyArtifact is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(assemblyArtifact); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 integrationAccountName, String assemblyArtifactName) { + deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).toBlocking().single().body(); + } + + /** + * Delete an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 integrationAccountName, String assemblyArtifactName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName), serviceCallback); + } + + /** + * Delete an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete an assembly for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (assemblyArtifactName == null) { + throw new IllegalArgumentException("Parameter assemblyArtifactName 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, integrationAccountName, assemblyArtifactName, 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); + } + + /** + * List the content callback url for an integration account assembly. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 WorkflowTriggerCallbackUrlInner object if successful. + */ + public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).toBlocking().single().body(); + } + + /** + * List the content callback url for an integration account assembly. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact 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 listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName), serviceCallback); + } + + /** + * List the content callback url for an integration account assembly. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List the content callback url for an integration account assembly. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param assemblyArtifactName The assembly artifact name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listContentCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String assemblyArtifactName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (assemblyArtifactName == null) { + throw new IllegalArgumentException("Parameter assemblyArtifactName 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.listContentCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, assemblyArtifactName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listContentCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listContentCallbackUrlDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java new file mode 100644 index 00000000000..c2c3f2e4594 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java @@ -0,0 +1,450 @@ +/** + * 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.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 com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +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 IntegrationAccountBatchConfigurations. + */ +public class IntegrationAccountBatchConfigurationsInner { + /** The Retrofit service to perform REST calls. */ + private IntegrationAccountBatchConfigurationsService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of IntegrationAccountBatchConfigurationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public IntegrationAccountBatchConfigurationsInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(IntegrationAccountBatchConfigurationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for IntegrationAccountBatchConfigurations to be + * used by Retrofit to perform actually REST calls. + */ + interface IntegrationAccountBatchConfigurationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccountBatchConfigurations list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @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.IntegrationAccountBatchConfigurations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @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.IntegrationAccountBatchConfigurations createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @Body BatchConfigurationInner assemblyArtifact, @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.IntegrationAccountBatchConfigurations delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List the batch configurations for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 BatchConfigurationCollectionInner object if successful. + */ + public BatchConfigurationCollectionInner list(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); + } + + /** + * List the batch configurations for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 integrationAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); + } + + /** + * List the batch configurations for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationCollectionInner object + */ + public Observable listAsync(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, BatchConfigurationCollectionInner>() { + @Override + public BatchConfigurationCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List the batch configurations for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationCollectionInner object + */ + public Observable> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName 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, integrationAccountName, 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); + } + + /** + * Get a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration 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 BatchConfigurationInner object if successful. + */ + public BatchConfigurationInner get(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName).toBlocking().single().body(); + } + + /** + * Get a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration 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 integrationAccountName, String batchConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName), serviceCallback); + } + + /** + * Get a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationInner object + */ + public Observable getAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { + return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName).map(new Func1, BatchConfigurationInner>() { + @Override + public BatchConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (batchConfigurationName == null) { + throw new IllegalArgumentException("Parameter batchConfigurationName 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, integrationAccountName, batchConfigurationName, 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); + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @param assemblyArtifact The assembly artifact. + * @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 BatchConfigurationInner object if successful. + */ + public BatchConfigurationInner createOrUpdate(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact).toBlocking().single().body(); + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @param assemblyArtifact The assembly artifact. + * @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 createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact), serviceCallback); + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @param assemblyArtifact The assembly artifact. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact).map(new Func1, BatchConfigurationInner>() { + @Override + public BatchConfigurationInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @param assemblyArtifact The assembly artifact. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the BatchConfigurationInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (batchConfigurationName == null) { + throw new IllegalArgumentException("Parameter batchConfigurationName is required and cannot be null."); + } + if (assemblyArtifact == null) { + throw new IllegalArgumentException("Parameter assemblyArtifact is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(assemblyArtifact); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Delete a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration 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 integrationAccountName, String batchConfigurationName) { + deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName).toBlocking().single().body(); + } + + /** + * Delete a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration 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 integrationAccountName, String batchConfigurationName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName), serviceCallback); + } + + /** + * Delete a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { + return deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete a batch configuration for an integration account. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param batchConfigurationName The batch configuration name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (batchConfigurationName == null) { + throw new IllegalArgumentException("Parameter batchConfigurationName 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, integrationAccountName, batchConfigurationName, 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); + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index 8dccea2e63f..3ad0f0b4135 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -10,11 +10,14 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.KeyType; +import com.microsoft.azure.management.logic.RegenerateActionParameter; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -43,7 +46,7 @@ * An instance of this class provides access to all the operations defined * in IntegrationAccounts. */ -public class IntegrationAccountsInner implements InnerSupportsGet, InnerSupportsDelete { +public class IntegrationAccountsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private IntegrationAccountsService service; /** The service client containing this operation class. */ @@ -65,9 +68,9 @@ public IntegrationAccountsInner(Retrofit retrofit, LogicManagementClientImpl cli * used by Retrofit to perform actually REST calls. */ interface IntegrationAccountsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listBySubscription" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @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.IntegrationAccounts listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts") @@ -89,13 +92,25 @@ interface IntegrationAccountsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @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.IntegrationAccounts getCallbackUrl" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listCallbackUrl" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl") - Observable> getCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner parameters, @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.IntegrationAccounts listBySubscriptionNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listKeyVaultKeys" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") + Observable> listKeyVaultKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body ListKeyVaultKeysDefinitionInner parameters, @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.IntegrationAccounts logTrackingEvents" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents") + Observable> logTrackingEvents(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body TrackingEventsDefinitionInner logTrackingEvents, @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.IntegrationAccounts regenerateAccessKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey") + Observable> regenerateAccessKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateActionParameter regenerateAccessKey, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listNext" }) @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listByResourceGroupNext" }) @GET @@ -111,12 +126,12 @@ interface IntegrationAccountsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<IntegrationAccountInner> object if successful. */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -128,13 +143,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -146,8 +161,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<IntegrationAccountInner> object */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -162,8 +177,8 @@ public Page call(ServiceResponse>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -171,7 +186,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -182,7 +197,7 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listBySubscriptionSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -190,12 +205,12 @@ public Observable>> listBySubscrip throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } final Integer top = null; - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -213,12 +228,12 @@ public Observable>> call(Response< * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<IntegrationAccountInner> object if successful. */ - public PagedList listBySubscription(final Integer top) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(top).toBlocking().single(); + public PagedList list(final Integer top) { + ServiceResponse> response = listSinglePageAsync(top).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -231,13 +246,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionAsync(final Integer top, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final Integer top, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(top), + listSinglePageAsync(top), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -250,8 +265,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<IntegrationAccountInner> object */ - public Observable> listBySubscriptionAsync(final Integer top) { - return listBySubscriptionWithServiceResponseAsync(top) + public Observable> listAsync(final Integer top) { + return listWithServiceResponseAsync(top) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -267,8 +282,8 @@ public Page call(ServiceResponse>> listBySubscriptionWithServiceResponseAsync(final Integer top) { - return listBySubscriptionSinglePageAsync(top) + public Observable>> listWithServiceResponseAsync(final Integer top) { + return listSinglePageAsync(top) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -276,7 +291,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -288,19 +303,19 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listBySubscriptionSinglePageAsync(final Integer top) { + public Observable>> listSinglePageAsync(final Integer top) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), this.client.apiVersion(), top, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -309,7 +324,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + 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) @@ -917,8 +932,8 @@ private ServiceResponse deleteDelegate(Response response) th * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the CallbackUrlInner object if successful. */ - public CallbackUrlInner getCallbackUrl(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); + public CallbackUrlInner listCallbackUrl(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + return listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); } /** @@ -931,8 +946,8 @@ public CallbackUrlInner getCallbackUrl(String resourceGroupName, String integrat * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); + public ServiceFuture listCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); } /** @@ -944,8 +959,8 @@ public ServiceFuture getCallbackUrlAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CallbackUrlInner object */ - public Observable getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, CallbackUrlInner>() { + public Observable listCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + return listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, CallbackUrlInner>() { @Override public CallbackUrlInner call(ServiceResponse response) { return response.body(); @@ -962,7 +977,7 @@ public CallbackUrlInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CallbackUrlInner object */ - public Observable> getCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -979,12 +994,12 @@ public Observable> getCallbackUrlWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - return service.getCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = getCallbackUrlDelegate(response); + ServiceResponse clientResponse = listCallbackUrlDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -993,13 +1008,374 @@ public Observable> call(Response }); } - private ServiceResponse getCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listCallbackUrlDelegate(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 the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param parameters The callback URL parameters. + * @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 KeyVaultKeyCollectionInner object if successful. + */ + public KeyVaultKeyCollectionInner listKeyVaultKeys(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param parameters The callback URL parameters. + * @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 listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param parameters The callback URL parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultKeyCollectionInner object + */ + public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, KeyVaultKeyCollectionInner>() { + @Override + public KeyVaultKeyCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param parameters The callback URL parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultKeyCollectionInner object + */ + public Observable> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeyVaultKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listKeyVaultKeysDelegate(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); + } + + /** + * Logs the integration account's tracking events. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param logTrackingEvents The callback URL parameters. + * @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 logTrackingEvents(String resourceGroupName, String integrationAccountName, TrackingEventsDefinitionInner logTrackingEvents) { + logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents).toBlocking().single().body(); + } + + /** + * Logs the integration account's tracking events. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param logTrackingEvents The callback URL parameters. + * @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 logTrackingEventsAsync(String resourceGroupName, String integrationAccountName, TrackingEventsDefinitionInner logTrackingEvents, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents), serviceCallback); + } + + /** + * Logs the integration account's tracking events. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param logTrackingEvents The callback URL parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable logTrackingEventsAsync(String resourceGroupName, String integrationAccountName, TrackingEventsDefinitionInner logTrackingEvents) { + return logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Logs the integration account's tracking events. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param logTrackingEvents The callback URL parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> logTrackingEventsWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, TrackingEventsDefinitionInner logTrackingEvents) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (logTrackingEvents == null) { + throw new IllegalArgumentException("Parameter logTrackingEvents is required and cannot be null."); + } + Validator.validate(logTrackingEvents); + return service.logTrackingEvents(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), logTrackingEvents, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = logTrackingEventsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse logTrackingEventsDelegate(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); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 IntegrationAccountInner object if successful. + */ + public IntegrationAccountInner regenerateAccessKey(String resourceGroupName, String integrationAccountName) { + return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account 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 regenerateAccessKeyAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationAccountInner object + */ + public Observable regenerateAccessKeyAsync(String resourceGroupName, String integrationAccountName) { + return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, IntegrationAccountInner>() { + @Override + public IntegrationAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationAccountInner object + */ + public Observable> regenerateAccessKeyWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final KeyType keyType = null; + RegenerateActionParameter regenerateAccessKey = new RegenerateActionParameter(); + regenerateAccessKey.withKeyType(null); + return service.regenerateAccessKey(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), this.client.acceptLanguage(), regenerateAccessKey, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateAccessKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * @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 IntegrationAccountInner object if successful. + */ + public IntegrationAccountInner regenerateAccessKey(String resourceGroupName, String integrationAccountName, KeyType keyType) { + return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName, keyType).toBlocking().single().body(); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * @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 regenerateAccessKeyAsync(String resourceGroupName, String integrationAccountName, KeyType keyType, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName, keyType), serviceCallback); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationAccountInner object + */ + public Observable regenerateAccessKeyAsync(String resourceGroupName, String integrationAccountName, KeyType keyType) { + return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName, keyType).map(new Func1, IntegrationAccountInner>() { + @Override + public IntegrationAccountInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the integration account access key. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the IntegrationAccountInner object + */ + public Observable> regenerateAccessKeyWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, KeyType keyType) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + RegenerateActionParameter regenerateAccessKey = new RegenerateActionParameter(); + regenerateAccessKey.withKeyType(keyType); + return service.regenerateAccessKey(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), this.client.acceptLanguage(), regenerateAccessKey, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = regenerateAccessKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse regenerateAccessKeyDelegate(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 list of integration accounts by subscription. * @@ -1009,12 +1385,12 @@ private ServiceResponse getCallbackUrlDelegate(Response listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1028,13 +1404,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1047,8 +1423,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<IntegrationAccountInner> object */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1064,8 +1440,8 @@ public Page call(ServiceResponse>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1073,7 +1449,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listBySubscriptionNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1085,17 +1461,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<IntegrationAccountInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { + 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.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1104,7 +1480,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + 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) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/JsonSchemaInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/JsonSchemaInner.java new file mode 100644 index 00000000000..fef91ee2412 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/JsonSchemaInner.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.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The JSON schema. + */ +public class JsonSchemaInner { + /** + * The JSON title. + */ + @JsonProperty(value = "title") + private String title; + + /** + * The JSON content. + */ + @JsonProperty(value = "content") + private String content; + + /** + * Get the title value. + * + * @return the title value + */ + public String title() { + return this.title; + } + + /** + * Set the title value. + * + * @param title the title value to set + * @return the JsonSchemaInner object itself. + */ + public JsonSchemaInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the content value. + * + * @return the content value + */ + public String content() { + return this.content; + } + + /** + * Set the content value. + * + * @param content the content value to set + * @return the JsonSchemaInner object itself. + */ + public JsonSchemaInner withContent(String content) { + this.content = content; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java new file mode 100644 index 00000000000..d577fea9666 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.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.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Collection of key vault keys. + */ +public class KeyVaultKeyCollectionInner { + /** + * The key vault keys. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the KeyVaultKeyCollectionInner object itself. + */ + public KeyVaultKeyCollectionInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ListKeyVaultKeysDefinitionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ListKeyVaultKeysDefinitionInner.java new file mode 100644 index 00000000000..23e59253aff --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ListKeyVaultKeysDefinitionInner.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.implementation; + +import com.microsoft.azure.management.logic.KeyVaultReference; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list key vault keys definition. + */ +public class ListKeyVaultKeysDefinitionInner { + /** + * The key vault reference. + */ + @JsonProperty(value = "keyVault", required = true) + private KeyVaultReference keyVault; + + /** + * The skip token. + */ + @JsonProperty(value = "skipToken") + private String skipToken; + + /** + * Get the keyVault value. + * + * @return the keyVault value + */ + public KeyVaultReference keyVault() { + return this.keyVault; + } + + /** + * Set the keyVault value. + * + * @param keyVault the keyVault value to set + * @return the ListKeyVaultKeysDefinitionInner object itself. + */ + public ListKeyVaultKeysDefinitionInner withKeyVault(KeyVaultReference keyVault) { + this.keyVault = keyVault; + return this; + } + + /** + * Get the skipToken value. + * + * @return the skipToken value + */ + public String skipToken() { + return this.skipToken; + } + + /** + * Set the skipToken value. + * + * @param skipToken the skipToken value to set + * @return the ListKeyVaultKeysDefinitionInner object itself. + */ + public ListKeyVaultKeysDefinitionInner withSkipToken(String skipToken) { + this.skipToken = skipToken; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java index d1b901bff08..4cd2f4b9e94 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/LogicManagementClientImpl.java @@ -231,6 +231,45 @@ public WorkflowRunActionsInner workflowRunActions() { return this.workflowRunActions; } + /** + * The WorkflowRunActionRepetitionsInner object to access its operations. + */ + private WorkflowRunActionRepetitionsInner workflowRunActionRepetitions; + + /** + * Gets the WorkflowRunActionRepetitionsInner object to access its operations. + * @return the WorkflowRunActionRepetitionsInner object. + */ + public WorkflowRunActionRepetitionsInner workflowRunActionRepetitions() { + return this.workflowRunActionRepetitions; + } + + /** + * The WorkflowRunActionScopedRepetitionsInner object to access its operations. + */ + private WorkflowRunActionScopedRepetitionsInner workflowRunActionScopedRepetitions; + + /** + * Gets the WorkflowRunActionScopedRepetitionsInner object to access its operations. + * @return the WorkflowRunActionScopedRepetitionsInner object. + */ + public WorkflowRunActionScopedRepetitionsInner workflowRunActionScopedRepetitions() { + return this.workflowRunActionScopedRepetitions; + } + + /** + * The WorkflowRunOperationsInner object to access its operations. + */ + private WorkflowRunOperationsInner workflowRunOperations; + + /** + * Gets the WorkflowRunOperationsInner object to access its operations. + * @return the WorkflowRunOperationsInner object. + */ + public WorkflowRunOperationsInner workflowRunOperations() { + return this.workflowRunOperations; + } + /** * The IntegrationAccountsInner object to access its operations. */ @@ -244,6 +283,32 @@ public IntegrationAccountsInner integrationAccounts() { return this.integrationAccounts; } + /** + * The IntegrationAccountAssembliesInner object to access its operations. + */ + private IntegrationAccountAssembliesInner integrationAccountAssemblies; + + /** + * Gets the IntegrationAccountAssembliesInner object to access its operations. + * @return the IntegrationAccountAssembliesInner object. + */ + public IntegrationAccountAssembliesInner integrationAccountAssemblies() { + return this.integrationAccountAssemblies; + } + + /** + * The IntegrationAccountBatchConfigurationsInner object to access its operations. + */ + private IntegrationAccountBatchConfigurationsInner integrationAccountBatchConfigurations; + + /** + * Gets the IntegrationAccountBatchConfigurationsInner object to access its operations. + * @return the IntegrationAccountBatchConfigurationsInner object. + */ + public IntegrationAccountBatchConfigurationsInner integrationAccountBatchConfigurations() { + return this.integrationAccountBatchConfigurations; + } + /** * The SchemasInner object to access its operations. */ @@ -363,7 +428,12 @@ protected void initialize() { this.workflowTriggerHistories = new WorkflowTriggerHistoriesInner(restClient().retrofit(), this); this.workflowRuns = new WorkflowRunsInner(restClient().retrofit(), this); this.workflowRunActions = new WorkflowRunActionsInner(restClient().retrofit(), this); + this.workflowRunActionRepetitions = new WorkflowRunActionRepetitionsInner(restClient().retrofit(), this); + this.workflowRunActionScopedRepetitions = new WorkflowRunActionScopedRepetitionsInner(restClient().retrofit(), this); + this.workflowRunOperations = new WorkflowRunOperationsInner(restClient().retrofit(), this); this.integrationAccounts = new IntegrationAccountsInner(restClient().retrofit(), this); + this.integrationAccountAssemblies = new IntegrationAccountAssembliesInner(restClient().retrofit(), this); + this.integrationAccountBatchConfigurations = new IntegrationAccountBatchConfigurationsInner(restClient().retrofit(), this); this.schemas = new SchemasInner(restClient().retrofit(), this); this.maps = new MapsInner(restClient().retrofit(), this); this.partners = new PartnersInner(restClient().retrofit(), this); diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java index df914d042b3..82440f65dbc 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java @@ -28,6 +28,7 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; @@ -77,6 +78,10 @@ interface MapsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("mapName") String mapName, @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.Maps listContentCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl") + Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("mapName") String mapName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner listContentCallbackUrl, @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.Maps listByIntegrationAccountsNext" }) @GET Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -622,6 +627,107 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param mapName The integration account map name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 WorkflowTriggerCallbackUrlInner object if successful. + */ + public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrl).toBlocking().single().body(); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param mapName The integration account map name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParametersInner listContentCallbackUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrl), serviceCallback); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param mapName The integration account map name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrl).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param mapName The integration account map name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listContentCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String mapName, GetCallbackUrlParametersInner listContentCallbackUrl) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (mapName == null) { + throw new IllegalArgumentException("Parameter mapName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (listContentCallbackUrl == null) { + throw new IllegalArgumentException("Parameter listContentCallbackUrl is required and cannot be null."); + } + Validator.validate(listContentCallbackUrl); + return service.listContentCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, mapName, this.client.apiVersion(), listContentCallbackUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listContentCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listContentCallbackUrlDelegate(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 list of integration account maps. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java index 8ff9eee1662..5aa16e9425c 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PartnersInner.java @@ -28,6 +28,7 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; @@ -77,6 +78,10 @@ interface PartnersService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("partnerName") String partnerName, @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.Partners listContentCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl") + Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("partnerName") String partnerName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner listContentCallbackUrl, @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.Partners listByIntegrationAccountsNext" }) @GET Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -622,6 +627,107 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param partnerName The integration account partner name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 WorkflowTriggerCallbackUrlInner object if successful. + */ + public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl).toBlocking().single().body(); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param partnerName The integration account partner name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParametersInner listContentCallbackUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl), serviceCallback); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param partnerName The integration account partner name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param partnerName The integration account partner name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listContentCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String partnerName, GetCallbackUrlParametersInner listContentCallbackUrl) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (partnerName == null) { + throw new IllegalArgumentException("Parameter partnerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (listContentCallbackUrl == null) { + throw new IllegalArgumentException("Parameter listContentCallbackUrl is required and cannot be null."); + } + Validator.validate(listContentCallbackUrl); + return service.listContentCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, partnerName, this.client.apiVersion(), listContentCallbackUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listContentCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listContentCallbackUrlDelegate(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 list of integration account partners. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java index cdc237413cb..6936afd66d3 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/SchemasInner.java @@ -28,6 +28,7 @@ import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; @@ -77,6 +78,10 @@ interface SchemasService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("schemaName") String schemaName, @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.Schemas listContentCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl") + Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner listContentCallbackUrl, @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.Schemas listByIntegrationAccountsNext" }) @GET Observable> listByIntegrationAccountsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -622,6 +627,107 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param schemaName The integration account schema name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 WorkflowTriggerCallbackUrlInner object if successful. + */ + public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGroupName, String integrationAccountName, String schemaName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrl).toBlocking().single().body(); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param schemaName The integration account schema name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @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 listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String schemaName, GetCallbackUrlParametersInner listContentCallbackUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrl), serviceCallback); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param schemaName The integration account schema name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listContentCallbackUrlAsync(String resourceGroupName, String integrationAccountName, String schemaName, GetCallbackUrlParametersInner listContentCallbackUrl) { + return listContentCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrl).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * List content callback url. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param schemaName The integration account schema name. + * @param listContentCallbackUrl the GetCallbackUrlParametersInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listContentCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String schemaName, GetCallbackUrlParametersInner listContentCallbackUrl) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (listContentCallbackUrl == null) { + throw new IllegalArgumentException("Parameter listContentCallbackUrl is required and cannot be null."); + } + Validator.validate(listContentCallbackUrl); + return service.listContentCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, schemaName, this.client.apiVersion(), listContentCallbackUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listContentCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listContentCallbackUrlDelegate(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 list of integration account schemas. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/TrackingEventsDefinitionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/TrackingEventsDefinitionInner.java new file mode 100644 index 00000000000..ea61d57eee3 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/TrackingEventsDefinitionInner.java @@ -0,0 +1,98 @@ +/** + * 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.implementation; + +import com.microsoft.azure.management.logic.TrackEventsOperationOptions; +import java.util.List; +import com.microsoft.azure.management.logic.TrackingEvent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The TrackingEventsDefinitionInner model. + */ +public class TrackingEventsDefinitionInner { + /** + * The sourceType property. + */ + @JsonProperty(value = "sourceType", required = true) + private String sourceType; + + /** + * Possible values include: 'None', 'DisableSourceInfoEnrich'. + */ + @JsonProperty(value = "trackEventsOptions") + private TrackEventsOperationOptions trackEventsOptions; + + /** + * The events property. + */ + @JsonProperty(value = "events", required = true) + private List events; + + /** + * Get the sourceType value. + * + * @return the sourceType value + */ + public String sourceType() { + return this.sourceType; + } + + /** + * Set the sourceType value. + * + * @param sourceType the sourceType value to set + * @return the TrackingEventsDefinitionInner object itself. + */ + public TrackingEventsDefinitionInner withSourceType(String sourceType) { + this.sourceType = sourceType; + return this; + } + + /** + * Get the trackEventsOptions value. + * + * @return the trackEventsOptions value + */ + public TrackEventsOperationOptions trackEventsOptions() { + return this.trackEventsOptions; + } + + /** + * Set the trackEventsOptions value. + * + * @param trackEventsOptions the trackEventsOptions value to set + * @return the TrackingEventsDefinitionInner object itself. + */ + public TrackingEventsDefinitionInner withTrackEventsOptions(TrackEventsOperationOptions trackEventsOptions) { + this.trackEventsOptions = trackEventsOptions; + return this; + } + + /** + * Get the events value. + * + * @return the events value + */ + public List events() { + return this.events; + } + + /** + * Set the events value. + * + * @param events the events value to set + * @return the TrackingEventsDefinitionInner object itself. + */ + public TrackingEventsDefinitionInner withEvents(List events) { + this.events = events; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionInner.java new file mode 100644 index 00000000000..91f5c062b2b --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionInner.java @@ -0,0 +1,354 @@ +/** + * 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.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.RunActionCorrelation; +import com.microsoft.azure.management.logic.WorkflowStatus; +import com.microsoft.azure.management.logic.ContentLink; +import java.util.List; +import com.microsoft.azure.management.logic.RetryHistory; +import com.microsoft.azure.management.logic.RepetitionIndex; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.Resource; + +/** + * The workflow run action repetition definition. + */ +@JsonFlatten +public class WorkflowRunActionRepetitionDefinitionInner extends Resource { + /** + * The start time of the workflow scope repetition. + */ + @JsonProperty(value = "properties.startTime") + private DateTime startTime; + + /** + * The end time of the workflow scope repetition. + */ + @JsonProperty(value = "properties.endTime") + private DateTime endTime; + + /** + * The correlation properties. + */ + @JsonProperty(value = "properties.correlation") + private RunActionCorrelation correlation; + + /** + * The status of the workflow scope repetition. Possible values include: + * 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', + * 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', + * 'Ignored'. + */ + @JsonProperty(value = "properties.status") + private WorkflowStatus status; + + /** + * The workflow scope repetition code. + */ + @JsonProperty(value = "properties.code") + private String code; + + /** + * The error property. + */ + @JsonProperty(value = "properties.error") + private Object error; + + /** + * Gets the tracking id. + */ + @JsonProperty(value = "properties.trackingId", access = JsonProperty.Access.WRITE_ONLY) + private String trackingId; + + /** + * Gets the inputs. + */ + @JsonProperty(value = "properties.inputs", access = JsonProperty.Access.WRITE_ONLY) + private Object inputs; + + /** + * Gets the link to inputs. + */ + @JsonProperty(value = "properties.inputsLink", access = JsonProperty.Access.WRITE_ONLY) + private ContentLink inputsLink; + + /** + * Gets the outputs. + */ + @JsonProperty(value = "properties.outputs", access = JsonProperty.Access.WRITE_ONLY) + private Object outputs; + + /** + * Gets the link to outputs. + */ + @JsonProperty(value = "properties.outputsLink", access = JsonProperty.Access.WRITE_ONLY) + private ContentLink outputsLink; + + /** + * Gets the tracked properties. + */ + @JsonProperty(value = "properties.trackedProperties", access = JsonProperty.Access.WRITE_ONLY) + private Object trackedProperties; + + /** + * Gets the retry histories. + */ + @JsonProperty(value = "properties.retryHistory") + private List retryHistory; + + /** + * The iterationCount property. + */ + @JsonProperty(value = "properties.iterationCount") + private Integer iterationCount; + + /** + * The repetition indexes. + */ + @JsonProperty(value = "properties.repetitionIndexes") + private List repetitionIndexes; + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withStartTime(DateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime value. + * + * @param endTime the endTime value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withEndTime(DateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the correlation value. + * + * @return the correlation value + */ + public RunActionCorrelation correlation() { + return this.correlation; + } + + /** + * Set the correlation value. + * + * @param correlation the correlation value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withCorrelation(RunActionCorrelation correlation) { + this.correlation = correlation; + return this; + } + + /** + * Get the status value. + * + * @return the status value + */ + public WorkflowStatus status() { + return this.status; + } + + /** + * Set the status value. + * + * @param status the status value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withStatus(WorkflowStatus status) { + this.status = status; + return this; + } + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set the code value. + * + * @param code the code value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public Object error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withError(Object error) { + this.error = error; + return this; + } + + /** + * Get the trackingId value. + * + * @return the trackingId value + */ + public String trackingId() { + return this.trackingId; + } + + /** + * Get the inputs value. + * + * @return the inputs value + */ + public Object inputs() { + return this.inputs; + } + + /** + * Get the inputsLink value. + * + * @return the inputsLink value + */ + public ContentLink inputsLink() { + return this.inputsLink; + } + + /** + * Get the outputs value. + * + * @return the outputs value + */ + public Object outputs() { + return this.outputs; + } + + /** + * Get the outputsLink value. + * + * @return the outputsLink value + */ + public ContentLink outputsLink() { + return this.outputsLink; + } + + /** + * Get the trackedProperties value. + * + * @return the trackedProperties value + */ + public Object trackedProperties() { + return this.trackedProperties; + } + + /** + * Get the retryHistory value. + * + * @return the retryHistory value + */ + public List retryHistory() { + return this.retryHistory; + } + + /** + * Set the retryHistory value. + * + * @param retryHistory the retryHistory value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withRetryHistory(List retryHistory) { + this.retryHistory = retryHistory; + return this; + } + + /** + * Get the iterationCount value. + * + * @return the iterationCount value + */ + public Integer iterationCount() { + return this.iterationCount; + } + + /** + * Set the iterationCount value. + * + * @param iterationCount the iterationCount value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withIterationCount(Integer iterationCount) { + this.iterationCount = iterationCount; + return this; + } + + /** + * Get the repetitionIndexes value. + * + * @return the repetitionIndexes value + */ + public List repetitionIndexes() { + return this.repetitionIndexes; + } + + /** + * Set the repetitionIndexes value. + * + * @param repetitionIndexes the repetitionIndexes value to set + * @return the WorkflowRunActionRepetitionDefinitionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionInner withRepetitionIndexes(List repetitionIndexes) { + this.repetitionIndexes = repetitionIndexes; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java new file mode 100644 index 00000000000..8885f41083b --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java @@ -0,0 +1,385 @@ +/** + * 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.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 java.util.List; +import java.util.Map; +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.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionRepetitions. + */ +public class WorkflowRunActionRepetitionsInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionRepetitionsService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionRepetitionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionRepetitionsInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionRepetitionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionRepetitions to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionRepetitionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActionRepetitions list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions") + 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.WorkflowRunActionRepetitions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}") + 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, @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.WorkflowRunActionRepetitions listExpressionTraces" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces") + Observable> listExpressionTraces(@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); + + } + + /** + * Get all of a workflow run action repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> object if successful. + */ + public List list(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> object + */ + public Observable> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> 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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a workflow run action repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object if successful. + */ + public WorkflowRunActionRepetitionDefinitionInner get(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + } + + /** + * Get a workflow run action repetition. + * + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + } + + /** + * Get a workflow run action repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, WorkflowRunActionRepetitionDefinitionInner>() { + @Override + public WorkflowRunActionRepetitionDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a workflow run action repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object + */ + public Observable> getWithServiceResponseAsync(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.get(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 = 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); + } + + /** + * Lists a workflow run expression trace. + * + * @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 Map<String, List<ExpressionInner>> object if successful. + */ + public Map> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + } + + /** + * Lists a workflow run expression trace. + * + * @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>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback>> serviceCallback) { + return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + } + + /** + * Lists a workflow run expression trace. + * + * @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 Map<String, List<ExpressionInner>> object + */ + public Observable>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1>>, Map>>() { + @Override + public Map> call(ServiceResponse>> response) { + return response.body(); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + * @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 Map<String, List<ExpressionInner>> object + */ + public Observable>>> listExpressionTracesWithServiceResponseAsync(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.listExpressionTraces(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 = listExpressionTracesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse>> listExpressionTracesDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java new file mode 100644 index 00000000000..af31b1ed7df --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java @@ -0,0 +1,272 @@ +/** + * 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.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 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.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in WorkflowRunActionScopedRepetitions. + */ +public class WorkflowRunActionScopedRepetitionsInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunActionScopedRepetitionsService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunActionScopedRepetitionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunActionScopedRepetitionsInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunActionScopedRepetitionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunActionScopedRepetitions to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunActionScopedRepetitionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActionScopedRepetitions list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions") + 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.WorkflowRunActionScopedRepetitions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}") + 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, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * List the workflow run action scoped repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> object if successful. + */ + public List list(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + } + + /** + * List the workflow run action scoped repetitions. + * + * @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 the workflow run action scoped repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> object + */ + public Observable> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the workflow run action scoped repetitions. + * + * @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 List<WorkflowRunActionRepetitionDefinitionInner> 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()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get a workflow run action scoped repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object if successful. + */ + public WorkflowRunActionRepetitionDefinitionInner get(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + } + + /** + * Get a workflow run action scoped repetition. + * + * @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 getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + } + + /** + * Get a workflow run action scoped repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, WorkflowRunActionRepetitionDefinitionInner>() { + @Override + public WorkflowRunActionRepetitionDefinitionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get a workflow run action scoped repetition. + * + * @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 WorkflowRunActionRepetitionDefinitionInner object + */ + public Observable> getWithServiceResponseAsync(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.get(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 = 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java index b52ee9f586f..d53f6b6fa67 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java @@ -20,11 +20,13 @@ import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List; +import java.util.Map; 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; @@ -65,6 +67,10 @@ interface WorkflowRunActionsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}") Observable> get(@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.WorkflowRunActions listExpressionTraces" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces") + Observable> listExpressionTraces(@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.WorkflowRunActions listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -438,6 +444,106 @@ private ServiceResponse getDelegate(Response> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); + } + + /** + * Lists a workflow run expression trace. + * + * @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>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback>> serviceCallback) { + return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + } + + /** + * Lists a workflow run expression trace. + * + * @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 Map<String, List<ExpressionInner>> object + */ + public Observable>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>>, Map>>() { + @Override + public Map> call(ServiceResponse>> response) { + return response.body(); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + * @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 Map<String, List<ExpressionInner>> object + */ + public Observable>>> listExpressionTracesWithServiceResponseAsync(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.listExpressionTraces(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 = listExpressionTracesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse>> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().>, CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets a list of workflow run actions. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java new file mode 100644 index 00000000000..e31184f7340 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java @@ -0,0 +1,160 @@ +/** + * 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.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.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +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 WorkflowRunOperations. + */ +public class WorkflowRunOperationsInner { + /** The Retrofit service to perform REST calls. */ + private WorkflowRunOperationsService service; + /** The service client containing this operation class. */ + private LogicManagementClientImpl client; + + /** + * Initializes an instance of WorkflowRunOperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public WorkflowRunOperationsInner(Retrofit retrofit, LogicManagementClientImpl client) { + this.service = retrofit.create(WorkflowRunOperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for WorkflowRunOperations to be + * used by Retrofit to perform actually REST calls. + */ + interface WorkflowRunOperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunOperations get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("runName") String runName, @Path("operationId") String operationId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an operation for a run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param operationId The workflow operation id. + * @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 WorkflowRunPropertiesInner object if successful. + */ + public WorkflowRunPropertiesInner get(String resourceGroupName, String workflowName, String runName, String operationId) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId).toBlocking().single().body(); + } + + /** + * Gets an operation for a run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param operationId The workflow operation id. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workflowName, String runName, String operationId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId), serviceCallback); + } + + /** + * Gets an operation for a run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param operationId The workflow operation id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowRunPropertiesInner object + */ + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String operationId) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId).map(new Func1, WorkflowRunPropertiesInner>() { + @Override + public WorkflowRunPropertiesInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an operation for a run. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param runName The workflow run name. + * @param operationId The workflow operation id. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowRunPropertiesInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String operationId) { + 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 (operationId == null) { + throw new IllegalArgumentException("Parameter operationId 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, operationId, 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunPropertiesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunPropertiesInner.java new file mode 100644 index 00000000000..dada6d93e44 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunPropertiesInner.java @@ -0,0 +1,202 @@ +/** + * 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.implementation; + +import org.joda.time.DateTime; +import com.microsoft.azure.management.logic.WorkflowStatus; +import com.microsoft.azure.management.logic.Correlation; +import com.microsoft.azure.management.logic.ResourceReference; +import com.microsoft.azure.management.logic.WorkflowRunTrigger; +import java.util.Map; +import com.microsoft.azure.management.logic.WorkflowOutputParameter; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The workflow run properties. + */ +public class WorkflowRunPropertiesInner { + /** + * Gets the start time. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * Gets the end time. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Gets the status. Possible values include: 'NotSpecified', 'Paused', + * 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', + * 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private WorkflowStatus status; + + /** + * Gets the code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /** + * Gets the error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private Object error; + + /** + * Gets the correlation id. + */ + @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) + private String correlationId; + + /** + * The run correlation. + */ + @JsonProperty(value = "correlation") + private Correlation correlation; + + /** + * Gets the reference to workflow version. + */ + @JsonProperty(value = "workflow", access = JsonProperty.Access.WRITE_ONLY) + private ResourceReference workflow; + + /** + * Gets the fired trigger. + */ + @JsonProperty(value = "trigger", access = JsonProperty.Access.WRITE_ONLY) + private WorkflowRunTrigger trigger; + + /** + * Gets the outputs. + */ + @JsonProperty(value = "outputs", access = JsonProperty.Access.WRITE_ONLY) + private Map outputs; + + /** + * Gets the response of the flow run. + */ + @JsonProperty(value = "response", access = JsonProperty.Access.WRITE_ONLY) + private WorkflowRunTrigger response; + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + + /** + * Get the status value. + * + * @return the status value + */ + public WorkflowStatus status() { + return this.status; + } + + /** + * Get the code value. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Get the error value. + * + * @return the error value + */ + public Object error() { + return this.error; + } + + /** + * Get the correlationId value. + * + * @return the correlationId value + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get the correlation value. + * + * @return the correlation value + */ + public Correlation correlation() { + return this.correlation; + } + + /** + * Set the correlation value. + * + * @param correlation the correlation value to set + * @return the WorkflowRunPropertiesInner object itself. + */ + public WorkflowRunPropertiesInner withCorrelation(Correlation correlation) { + this.correlation = correlation; + return this; + } + + /** + * Get the workflow value. + * + * @return the workflow value + */ + public ResourceReference workflow() { + return this.workflow; + } + + /** + * Get the trigger value. + * + * @return the trigger value + */ + public WorkflowRunTrigger trigger() { + return this.trigger; + } + + /** + * Get the outputs value. + * + * @return the outputs value + */ + public Map outputs() { + return this.outputs; + } + + /** + * Get the response value. + * + * @return the response value + */ + public WorkflowRunTrigger response() { + return this.response; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java index 4e04a89636b..18a9d90d1a3 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java @@ -13,15 +13,18 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.logic.SetTriggerStateActionDefinition; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; +import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; @@ -67,10 +70,22 @@ interface WorkflowTriggersService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}") Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @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.WorkflowTriggers reset" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset") + Observable> reset(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @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.WorkflowTriggers run" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run") Observable> run(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @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.WorkflowTriggers getSchemaJson" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json") + Observable> getSchemaJson(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @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.WorkflowTriggers setState" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState") + Observable> setState(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SetTriggerStateActionDefinition setState, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowTriggers listCallbackUrl" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl") Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -425,6 +440,98 @@ private ServiceResponse getDelegate(Response .build(response); } + /** + * Resets a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger 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 reset(String resourceGroupName, String workflowName, String triggerName) { + resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body(); + } + + /** + * Resets a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger 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 resetAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback); + } + + /** + * Resets a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable resetAsync(String resourceGroupName, String workflowName, String triggerName) { + return resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { + 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 (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName 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.reset(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = resetDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse resetDelegate(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); + } + /** * Runs a workflow trigger. * @@ -517,6 +624,201 @@ private ServiceResponse runDelegate(Response response) thr .build(response); } + /** + * Get the trigger schema as JSON. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger 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 JsonSchemaInner object if successful. + */ + public JsonSchemaInner getSchemaJson(String resourceGroupName, String workflowName, String triggerName) { + return getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body(); + } + + /** + * Get the trigger schema as JSON. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger 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 getSchemaJsonAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback); + } + + /** + * Get the trigger schema as JSON. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JsonSchemaInner object + */ + public Observable getSchemaJsonAsync(String resourceGroupName, String workflowName, String triggerName) { + return getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1, JsonSchemaInner>() { + @Override + public JsonSchemaInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the trigger schema as JSON. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JsonSchemaInner object + */ + public Observable> getSchemaJsonWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { + 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 (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName 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.getSchemaJson(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getSchemaJsonDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getSchemaJsonDelegate(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); + } + + /** + * Sets the state of a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @param source the WorkflowTriggerInner value + * @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 setState(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) { + setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source).toBlocking().single().body(); + } + + /** + * Sets the state of a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @param source the WorkflowTriggerInner value + * @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 setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source), serviceCallback); + } + + /** + * Sets the state of a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @param source the WorkflowTriggerInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) { + return setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Sets the state of a workflow trigger. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param triggerName The workflow trigger name. + * @param source the WorkflowTriggerInner value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> setStateWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) { + 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 (triggerName == null) { + throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (source == null) { + throw new IllegalArgumentException("Parameter source is required and cannot be null."); + } + Validator.validate(source); + SetTriggerStateActionDefinition setState = new SetTriggerStateActionDefinition(); + setState.withSource(source); + return service.setState(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), setState, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = setStateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse setStateDelegate(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 the callback URL for a workflow trigger. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java index 45d85f62f75..a641a21bb51 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowsInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -46,7 +47,7 @@ * An instance of this class provides access to all the operations defined * in Workflows. */ -public class WorkflowsInner implements InnerSupportsGet, InnerSupportsDelete { +public class WorkflowsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private WorkflowsService service; /** The service client containing this operation class. */ @@ -68,9 +69,9 @@ public WorkflowsInner(Retrofit retrofit, LogicManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface WorkflowsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listBySubscription" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows") - Observable> listBySubscription(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @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.Workflows listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows") @@ -104,21 +105,33 @@ interface WorkflowsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition") Observable> generateUpgradedDefinition(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body GenerateUpgradedDefinitionParameters parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listCallbackUrl" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl") + Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Body GetCallbackUrlParametersInner listCallbackUrl, @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.Workflows listSwagger" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger") Observable> listSwagger(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @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.Workflows move" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move") + Observable> move(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Body WorkflowInner move, @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.Workflows regenerateAccessKey" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey") Observable> regenerateAccessKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateActionParameter keyType, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows validateWorkflow" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate") + Observable> validateWorkflow(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Body WorkflowInner validate, @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.Workflows validate" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate") Observable> validate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("location") String location, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Body WorkflowInner workflow, @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.Workflows listBySubscriptionNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listNext" }) @GET - Observable> listBySubscriptionNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.Workflows listByResourceGroupNext" }) @GET @@ -134,12 +147,12 @@ interface WorkflowsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<WorkflowInner> object if successful. */ - public PagedList listBySubscription() { - ServiceResponse> response = listBySubscriptionSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -151,13 +164,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -169,8 +182,8 @@ public Observable>> call(String nextPageLink * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable> listBySubscriptionAsync() { - return listBySubscriptionWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -185,8 +198,8 @@ public Page call(ServiceResponse> response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable>> listBySubscriptionWithServiceResponseAsync() { - return listBySubscriptionSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -194,7 +207,7 @@ public Observable>> call(ServiceResponse>> call(ServiceResponse>> listBySubscriptionSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -214,12 +227,12 @@ public Observable>> listBySubscriptionSingle } final Integer top = null; final String filter = null; - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -238,12 +251,12 @@ public Observable>> call(Response listBySubscription(final Integer top, final String filter) { - ServiceResponse> response = listBySubscriptionSinglePageAsync(top, filter).toBlocking().single(); + public PagedList list(final Integer top, final String filter) { + ServiceResponse> response = listSinglePageAsync(top, filter).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -257,13 +270,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionAsync(final Integer top, final String filter, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final Integer top, final String filter, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionSinglePageAsync(top, filter), + listSinglePageAsync(top, filter), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -277,8 +290,8 @@ public Observable>> call(String nextPageLink * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable> listBySubscriptionAsync(final Integer top, final String filter) { - return listBySubscriptionWithServiceResponseAsync(top, filter) + public Observable> listAsync(final Integer top, final String filter) { + return listWithServiceResponseAsync(top, filter) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -295,8 +308,8 @@ public Page call(ServiceResponse> response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable>> listBySubscriptionWithServiceResponseAsync(final Integer top, final String filter) { - return listBySubscriptionSinglePageAsync(top, filter) + public Observable>> listWithServiceResponseAsync(final Integer top, final String filter) { + return listSinglePageAsync(top, filter) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -304,7 +317,7 @@ public Observable>> call(ServiceResponse>> call(ServiceResponse>> listBySubscriptionSinglePageAsync(final Integer top, final String filter) { + public Observable>> listSinglePageAsync(final Integer top, final String filter) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.listBySubscription(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -338,7 +351,7 @@ public Observable>> call(Response> listBySubscriptionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + 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) @@ -1285,6 +1298,100 @@ private ServiceResponse generateUpgradedDefinitionDelegate(Response listCallbackUrlAsync(String resourceGroupName, String workflowName, GetCallbackUrlParametersInner listCallbackUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, listCallbackUrl), serviceCallback); + } + + /** + * Lists workflow callback Url. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param listCallbackUrl Which callback url to list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable listCallbackUrlAsync(String resourceGroupName, String workflowName, GetCallbackUrlParametersInner listCallbackUrl) { + return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, listCallbackUrl).map(new Func1, WorkflowTriggerCallbackUrlInner>() { + @Override + public WorkflowTriggerCallbackUrlInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists workflow callback Url. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param listCallbackUrl Which callback url to list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the WorkflowTriggerCallbackUrlInner object + */ + public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String workflowName, GetCallbackUrlParametersInner listCallbackUrl) { + 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 (listCallbackUrl == null) { + throw new IllegalArgumentException("Parameter listCallbackUrl is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(listCallbackUrl); + return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, workflowName, listCallbackUrl, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listCallbackUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listCallbackUrlDelegate(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 an OpenAPI definition for the workflow. * @@ -1371,6 +1478,100 @@ private ServiceResponse listSwaggerDelegate(Response respo .build(response); } + /** + * Moves an existing workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param move The workflow id to move. + * @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 move(String resourceGroupName, String workflowName, WorkflowInner move) { + moveWithServiceResponseAsync(resourceGroupName, workflowName, move).toBlocking().single().body(); + } + + /** + * Moves an existing workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param move The workflow id to move. + * @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 moveAsync(String resourceGroupName, String workflowName, WorkflowInner move, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(moveWithServiceResponseAsync(resourceGroupName, workflowName, move), serviceCallback); + } + + /** + * Moves an existing workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param move The workflow id to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable moveAsync(String resourceGroupName, String workflowName, WorkflowInner move) { + return moveWithServiceResponseAsync(resourceGroupName, workflowName, move).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Moves an existing workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param move The workflow id to move. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> moveWithServiceResponseAsync(String resourceGroupName, String workflowName, WorkflowInner move) { + 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 (move == null) { + throw new IllegalArgumentException("Parameter move is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(move); + return service.move(this.client.subscriptionId(), resourceGroupName, workflowName, move, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = moveDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse moveDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Regenerates the callback URL access key for request triggers. * @@ -1543,6 +1744,99 @@ private ServiceResponse regenerateAccessKeyDelegate(Response .build(response); } + /** + * Validates the workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param validate The workflow. + * @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 validateWorkflow(String resourceGroupName, String workflowName, WorkflowInner validate) { + validateWorkflowWithServiceResponseAsync(resourceGroupName, workflowName, validate).toBlocking().single().body(); + } + + /** + * Validates the workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param validate The workflow. + * @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 validateWorkflowAsync(String resourceGroupName, String workflowName, WorkflowInner validate, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(validateWorkflowWithServiceResponseAsync(resourceGroupName, workflowName, validate), serviceCallback); + } + + /** + * Validates the workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param validate The workflow. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable validateWorkflowAsync(String resourceGroupName, String workflowName, WorkflowInner validate) { + return validateWorkflowWithServiceResponseAsync(resourceGroupName, workflowName, validate).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Validates the workflow. + * + * @param resourceGroupName The resource group name. + * @param workflowName The workflow name. + * @param validate The workflow. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> validateWorkflowWithServiceResponseAsync(String resourceGroupName, String workflowName, WorkflowInner validate) { + 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 (validate == null) { + throw new IllegalArgumentException("Parameter validate is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(validate); + return service.validateWorkflow(this.client.subscriptionId(), resourceGroupName, workflowName, validate, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = validateWorkflowDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse validateWorkflowDelegate(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); + } + /** * Validates the workflow definition. * @@ -1652,12 +1946,12 @@ private ServiceResponse validateDelegate(Response response) * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<WorkflowInner> object if successful. */ - public PagedList listBySubscriptionNext(final String nextPageLink) { - ServiceResponse> response = listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1671,13 +1965,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listBySubscriptionNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listBySubscriptionNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1690,8 +1984,8 @@ public Observable>> call(String nextPageLink * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable> listBySubscriptionNextAsync(final String nextPageLink) { - return listBySubscriptionNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1707,8 +2001,8 @@ public Page call(ServiceResponse> response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<WorkflowInner> object */ - public Observable>> listBySubscriptionNextWithServiceResponseAsync(final String nextPageLink) { - return listBySubscriptionNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1716,7 +2010,7 @@ public Observable>> call(ServiceResponse>> call(ServiceResponse>> listBySubscriptionNextSinglePageAsync(final String nextPageLink) { + 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.listBySubscriptionNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listBySubscriptionNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1747,7 +2041,7 @@ public Observable>> call(Response> listBySubscriptionNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + 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) From f04640ca016d4ef5ecbe529f9298402d6cbe25a2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 15:52:37 +0000 Subject: [PATCH 02/13] Generated from bef7a971111a2c61a983a38c78377c943bd9852f Build fixes --- .../azure/management/logic/Expression.java | 122 ++++++++++++++++++ .../management/logic/ExpressionRoot.java | 43 ++++++ ...WorkflowTriggerListCallbackUrlQueries.java | 26 ++++ .../implementation/ExpressionTracesInner.java | 45 +++++++ .../WorkflowRunActionRepetitionsInner.java | 31 +++-- .../WorkflowRunActionsInner.java | 31 +++-- 6 files changed, 266 insertions(+), 32 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Expression.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ExpressionRoot.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionTracesInner.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Expression.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Expression.java new file mode 100644 index 00000000000..9e7ab2352cd --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/Expression.java @@ -0,0 +1,122 @@ +/** + * 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; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Expression model. + */ +public class Expression { + /** + * The text property. + */ + @JsonProperty(value = "text") + private String text; + + /** + * The value property. + */ + @JsonProperty(value = "value") + private Object value; + + /** + * The subexpressions property. + */ + @JsonProperty(value = "subexpressions") + private List subexpressions; + + /** + * The error property. + */ + @JsonProperty(value = "error") + private AzureResourceErrorInfo error; + + /** + * Get the text value. + * + * @return the text value + */ + public String text() { + return this.text; + } + + /** + * Set the text value. + * + * @param text the text value to set + * @return the Expression object itself. + */ + public Expression withText(String text) { + this.text = text; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public Object value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the Expression object itself. + */ + public Expression withValue(Object value) { + this.value = value; + return this; + } + + /** + * Get the subexpressions value. + * + * @return the subexpressions value + */ + public List subexpressions() { + return this.subexpressions; + } + + /** + * Set the subexpressions value. + * + * @param subexpressions the subexpressions value to set + * @return the Expression object itself. + */ + public Expression withSubexpressions(List subexpressions) { + this.subexpressions = subexpressions; + return this; + } + + /** + * Get the error value. + * + * @return the error value + */ + public AzureResourceErrorInfo error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the Expression object itself. + */ + public Expression withError(AzureResourceErrorInfo error) { + this.error = error; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ExpressionRoot.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ExpressionRoot.java new file mode 100644 index 00000000000..e3562ba9a24 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/ExpressionRoot.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; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ExpressionRoot model. + */ +public class ExpressionRoot extends Expression { + /** + * The path. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the path value. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path value. + * + * @param path the path value to set + * @return the ExpressionRoot object itself. + */ + public ExpressionRoot withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java index e4535ec34c7..5a5aa8a44a7 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerListCallbackUrlQueries.java @@ -38,6 +38,12 @@ public class WorkflowTriggerListCallbackUrlQueries { @JsonProperty(value = "sig") private String sig; + /** + * The SAS timestamp. + */ + @JsonProperty(value = "se") + private String se; + /** * Get the apiVersion value. * @@ -118,4 +124,24 @@ public WorkflowTriggerListCallbackUrlQueries withSig(String sig) { return this; } + /** + * Get the se value. + * + * @return the se value + */ + public String se() { + return this.se; + } + + /** + * Set the se value. + * + * @param se the se value to set + * @return the WorkflowTriggerListCallbackUrlQueries object itself. + */ + public WorkflowTriggerListCallbackUrlQueries withSe(String se) { + this.se = se; + return this; + } + } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionTracesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionTracesInner.java new file mode 100644 index 00000000000..455bfc943c8 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionTracesInner.java @@ -0,0 +1,45 @@ +/** + * 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.implementation; + +import java.util.List; +import com.microsoft.azure.management.logic.ExpressionRoot; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ExpressionTracesInner model. + */ +public class ExpressionTracesInner { + /** + * The inputs property. + */ + @JsonProperty(value = "inputs") + private List inputs; + + /** + * Get the inputs value. + * + * @return the inputs value + */ + public List inputs() { + return this.inputs; + } + + /** + * Set the inputs value. + * + * @param inputs the inputs value to set + * @return the ExpressionTracesInner object itself. + */ + public ExpressionTracesInner withInputs(List inputs) { + this.inputs = inputs; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java index 8885f41083b..3f362a33fc6 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java @@ -16,7 +16,6 @@ import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.GET; import retrofit2.http.Header; @@ -286,9 +285,9 @@ private ServiceResponse getDelegate( * @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 Map<String, List<ExpressionInner>> object if successful. + * @return the ExpressionTracesInner object if successful. */ - public Map> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public ExpressionTracesInner listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); } @@ -304,7 +303,7 @@ public Map> listExpressionTraces(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback>> serviceCallback) { + public ServiceFuture listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); } @@ -317,12 +316,12 @@ public ServiceFuture>> listExpressionTracesAsy * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Map<String, List<ExpressionInner>> object + * @return the observable to the ExpressionTracesInner object */ - public Observable>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1>>, Map>>() { + public Observable listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, ExpressionTracesInner>() { @Override - public Map> call(ServiceResponse>> response) { + public ExpressionTracesInner call(ServiceResponse response) { return response.body(); } }); @@ -337,9 +336,9 @@ public Map> call(ServiceResponse>>> listExpressionTracesWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable> listExpressionTracesWithServiceResponseAsync(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."); } @@ -362,11 +361,11 @@ public Observable>>> listExpre throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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 = listExpressionTracesDelegate(response); + ServiceResponse clientResponse = listExpressionTracesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -375,9 +374,9 @@ public Observable>>> call(Resp }); } - private ServiceResponse>> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().>, CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>>() { }.getType()) + private ServiceResponse listExpressionTracesDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java index d53f6b6fa67..cc1229eaa30 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java @@ -20,7 +20,6 @@ import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.GET; import retrofit2.http.Header; @@ -454,9 +453,9 @@ private ServiceResponse getDelegate(Response> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { + public ExpressionTracesInner listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); } @@ -471,7 +470,7 @@ public Map> listExpressionTraces(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback>> serviceCallback) { + public ServiceFuture listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); } @@ -483,12 +482,12 @@ public ServiceFuture>> listExpressionTracesAsy * @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 Map<String, List<ExpressionInner>> object + * @return the observable to the ExpressionTracesInner object */ - public Observable>> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>>, Map>>() { + public Observable listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, ExpressionTracesInner>() { @Override - public Map> call(ServiceResponse>> response) { + public ExpressionTracesInner call(ServiceResponse response) { return response.body(); } }); @@ -502,9 +501,9 @@ public Map> call(ServiceResponse>>> listExpressionTracesWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable> listExpressionTracesWithServiceResponseAsync(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."); } @@ -524,11 +523,11 @@ public Observable>>> listExpre throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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 = listExpressionTracesDelegate(response); + ServiceResponse clientResponse = listExpressionTracesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -537,9 +536,9 @@ public Observable>>> call(Resp }); } - private ServiceResponse>> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().>, CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>>() { }.getType()) + private ServiceResponse listExpressionTracesDelegate(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 3652150d016e56201e6b9901ac2ae411f78436e0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 16:39:12 +0000 Subject: [PATCH 03/13] Generated from 7bd3c7621aa420e63c1256a3dd6ba0f166454226 Build fixes --- .../IntegrationAccountsInner.java | 124 +++++++++++++++--- ...onRepetitionDefinitionCollectionInner.java | 44 +++++++ ...rkflowRunActionScopedRepetitionsInner.java | 31 +++-- .../WorkflowRunOperationsInner.java | 30 ++--- 4 files changed, 182 insertions(+), 47 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionCollectionInner.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index 3ad0f0b4135..01afc259118 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -98,7 +98,7 @@ interface IntegrationAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listKeyVaultKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") - Observable> listKeyVaultKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body ListKeyVaultKeysDefinitionInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listKeyVaultKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body ListKeyVaultKeysDefinitionInner listKeyVaultKeys, @Query("skipToken") String skipToken, @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.IntegrationAccounts logTrackingEvents" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents") @@ -1020,14 +1020,14 @@ private ServiceResponse listCallbackUrlDelegate(Response listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); + public ServiceFuture listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys), serviceCallback); } /** @@ -1049,12 +1049,12 @@ public ServiceFuture listKeyVaultKeysAsync(String re * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. - * @param parameters The callback URL parameters. + * @param listKeyVaultKeys The key vault parameters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the KeyVaultKeyCollectionInner object */ - public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters) { - return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, KeyVaultKeyCollectionInner>() { + public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).map(new Func1, KeyVaultKeyCollectionInner>() { @Override public KeyVaultKeyCollectionInner call(ServiceResponse response) { return response.body(); @@ -1067,11 +1067,11 @@ public KeyVaultKeyCollectionInner call(ServiceResponse> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner parameters) { + public Observable> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1084,11 +1084,103 @@ public Observable> listKeyVaultKeysW if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + if (listKeyVaultKeys == null) { + throw new IllegalArgumentException("Parameter listKeyVaultKeys is required and cannot be null."); } - Validator.validate(parameters); - return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(listKeyVaultKeys); + final String skipToken = null; + return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, skipToken, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listKeyVaultKeysDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param listKeyVaultKeys The key vault parameters. + * @param skipToken The skip token. + * @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 KeyVaultKeyCollectionInner object if successful. + */ + public KeyVaultKeyCollectionInner listKeyVaultKeys(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, skipToken).toBlocking().single().body(); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param listKeyVaultKeys The key vault parameters. + * @param skipToken The skip token. + * @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 listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, skipToken), serviceCallback); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param listKeyVaultKeys The key vault parameters. + * @param skipToken The skip token. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultKeyCollectionInner object + */ + public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, skipToken).map(new Func1, KeyVaultKeyCollectionInner>() { + @Override + public KeyVaultKeyCollectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @param resourceGroupName The resource group name. + * @param integrationAccountName The integration account name. + * @param listKeyVaultKeys The key vault parameters. + * @param skipToken The skip token. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the KeyVaultKeyCollectionInner object + */ + public Observable> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken) { + 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 (integrationAccountName == null) { + throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (listKeyVaultKeys == null) { + throw new IllegalArgumentException("Parameter listKeyVaultKeys is required and cannot be null."); + } + Validator.validate(listKeyVaultKeys); + return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, skipToken, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionCollectionInner.java new file mode 100644 index 00000000000..38b4f22d618 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionDefinitionCollectionInner.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.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of workflow run action repetitions. + */ +public class WorkflowRunActionRepetitionDefinitionCollectionInner { + /** + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value value. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the WorkflowRunActionRepetitionDefinitionCollectionInner object itself. + */ + public WorkflowRunActionRepetitionDefinitionCollectionInner withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java index af31b1ed7df..ee37ef4b530 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionScopedRepetitionsInner.java @@ -15,7 +15,6 @@ 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; @@ -72,9 +71,9 @@ interface WorkflowRunActionScopedRepetitionsService { * @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 List<WorkflowRunActionRepetitionDefinitionInner> object if successful. + * @return the WorkflowRunActionRepetitionDefinitionCollectionInner object if successful. */ - public List list(String resourceGroupName, String workflowName, String runName, String actionName) { + public WorkflowRunActionRepetitionDefinitionCollectionInner list(String resourceGroupName, String workflowName, String runName, String actionName) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); } @@ -89,7 +88,7 @@ public List list(String resourceGrou * @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) { + public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); } @@ -101,12 +100,12 @@ public ServiceFuture> listAsync * @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 List<WorkflowRunActionRepetitionDefinitionInner> object + * @return the observable to the WorkflowRunActionRepetitionDefinitionCollectionInner object */ - public Observable> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, WorkflowRunActionRepetitionDefinitionCollectionInner>() { @Override - public List call(ServiceResponse> response) { + public WorkflowRunActionRepetitionDefinitionCollectionInner call(ServiceResponse response) { return response.body(); } }); @@ -120,9 +119,9 @@ public List call(ServiceResponse>> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + 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."); } @@ -142,11 +141,11 @@ public Observable, Observable>>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> clientResponse = listDelegate(response); + ServiceResponse clientResponse = listDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -155,9 +154,9 @@ public Observable> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + 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); } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java index e31184f7340..78cc0e5f580 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunOperationsInner.java @@ -67,9 +67,9 @@ interface WorkflowRunOperationsService { * @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 WorkflowRunPropertiesInner object if successful. + * @return the WorkflowRunInner object if successful. */ - public WorkflowRunPropertiesInner get(String resourceGroupName, String workflowName, String runName, String operationId) { + public WorkflowRunInner get(String resourceGroupName, String workflowName, String runName, String operationId) { return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId).toBlocking().single().body(); } @@ -84,7 +84,7 @@ public WorkflowRunPropertiesInner get(String resourceGroupName, String workflowN * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getAsync(String resourceGroupName, String workflowName, String runName, String operationId, final ServiceCallback serviceCallback) { + public ServiceFuture getAsync(String resourceGroupName, String workflowName, String runName, String operationId, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId), serviceCallback); } @@ -96,12 +96,12 @@ public ServiceFuture getAsync(String resourceGroupNa * @param runName The workflow run name. * @param operationId The workflow operation id. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the WorkflowRunPropertiesInner object + * @return the observable to the WorkflowRunInner object */ - public Observable getAsync(String resourceGroupName, String workflowName, String runName, String operationId) { - return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId).map(new Func1, WorkflowRunPropertiesInner>() { + public Observable getAsync(String resourceGroupName, String workflowName, String runName, String operationId) { + return getWithServiceResponseAsync(resourceGroupName, workflowName, runName, operationId).map(new Func1, WorkflowRunInner>() { @Override - public WorkflowRunPropertiesInner call(ServiceResponse response) { + public WorkflowRunInner call(ServiceResponse response) { return response.body(); } }); @@ -115,9 +115,9 @@ public WorkflowRunPropertiesInner call(ServiceResponse> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String operationId) { + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String operationId) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -137,11 +137,11 @@ public Observable> getWithServiceRes throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, runName, operationId, 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 = getDelegate(response); + ServiceResponse clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -150,9 +150,9 @@ public Observable> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + 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 f704e26b36642c988035af5f02c9a6fae298d718 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 17:11:14 +0000 Subject: [PATCH 04/13] Generated from 181e7cd086656eb323034c788c17652d74c41f9c Build fix --- .../logic/WorkflowTriggerRecurrence.java | 13 ++++---- .../KeyVaultKeyCollectionInner.java | 26 ++++++++++++++++ .../WorkflowRunActionRepetitionsInner.java | 31 +++++++++---------- .../implementation/WorkflowRunInner.java | 15 +++++++++ 4 files changed, 62 insertions(+), 23 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java index 600e95b7c44..525ae7b2694 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowTriggerRecurrence.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.logic; -import org.joda.time.DateTime; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -32,13 +31,13 @@ public class WorkflowTriggerRecurrence { * The start time. */ @JsonProperty(value = "startTime") - private DateTime startTime; + private String startTime; /** * The end time. */ @JsonProperty(value = "endTime") - private DateTime endTime; + private String endTime; /** * The time zone. @@ -97,7 +96,7 @@ public WorkflowTriggerRecurrence withInterval(Integer interval) { * * @return the startTime value */ - public DateTime startTime() { + public String startTime() { return this.startTime; } @@ -107,7 +106,7 @@ public DateTime startTime() { * @param startTime the startTime value to set * @return the WorkflowTriggerRecurrence object itself. */ - public WorkflowTriggerRecurrence withStartTime(DateTime startTime) { + public WorkflowTriggerRecurrence withStartTime(String startTime) { this.startTime = startTime; return this; } @@ -117,7 +116,7 @@ public WorkflowTriggerRecurrence withStartTime(DateTime startTime) { * * @return the endTime value */ - public DateTime endTime() { + public String endTime() { return this.endTime; } @@ -127,7 +126,7 @@ public DateTime endTime() { * @param endTime the endTime value to set * @return the WorkflowTriggerRecurrence object itself. */ - public WorkflowTriggerRecurrence withEndTime(DateTime endTime) { + public WorkflowTriggerRecurrence withEndTime(String endTime) { this.endTime = endTime; return this; } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java index d577fea9666..21dc2eec77b 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java @@ -21,6 +21,12 @@ public class KeyVaultKeyCollectionInner { @JsonProperty(value = "value") private List value; + /** + * The skip token. + */ + @JsonProperty(value = "skipToken") + private String skipToken; + /** * Get the value value. * @@ -41,4 +47,24 @@ public KeyVaultKeyCollectionInner withValue(List list(String resourceGroupName, String workflowName, String runName, String actionName) { + public WorkflowRunActionRepetitionDefinitionCollectionInner list(String resourceGroupName, String workflowName, String runName, String actionName) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); } @@ -94,7 +93,7 @@ public List list(String resourceGrou * @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) { + public ServiceFuture listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); } @@ -106,12 +105,12 @@ public ServiceFuture> listAsync * @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 List<WorkflowRunActionRepetitionDefinitionInner> object + * @return the observable to the WorkflowRunActionRepetitionDefinitionCollectionInner object */ - public Observable> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, WorkflowRunActionRepetitionDefinitionCollectionInner>() { @Override - public List call(ServiceResponse> response) { + public WorkflowRunActionRepetitionDefinitionCollectionInner call(ServiceResponse response) { return response.body(); } }); @@ -125,9 +124,9 @@ public List call(ServiceResponse>> listWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + 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."); } @@ -147,11 +146,11 @@ public Observable, Observable>>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> clientResponse = listDelegate(response); + ServiceResponse clientResponse = listDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -160,9 +159,9 @@ public Observable> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + 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); } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java index f35f53f0c60..2a536187a6c 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunInner.java @@ -24,6 +24,12 @@ */ @JsonFlatten public class WorkflowRunInner extends SubResource { + /** + * Gets the wait end time. + */ + @JsonProperty(value = "properties.waitEndTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime waitEndTime; + /** * Gets the start time. */ @@ -104,6 +110,15 @@ public class WorkflowRunInner extends SubResource { @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; + /** + * Get the waitEndTime value. + * + * @return the waitEndTime value + */ + public DateTime waitEndTime() { + return this.waitEndTime; + } + /** * Get the startTime value. * From 5be67ed87cda6a676823bec8a79e0d59af0ca04c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 17:24:23 +0000 Subject: [PATCH 05/13] Generated from 4f80dbbe7d8d90a70584c8e3505c3ffa0f6e7a48 Build fixes --- .../management/logic/WorkflowRunTrigger.java | 15 +++++++++++++++ .../KeyVaultKeyCollectionInner.java | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java index 26528039fe3..72399251da2 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/WorkflowRunTrigger.java @@ -45,6 +45,12 @@ public class WorkflowRunTrigger { @JsonProperty(value = "outputsLink", access = JsonProperty.Access.WRITE_ONLY) private ContentLink outputsLink; + /** + * Gets the scheduled time. + */ + @JsonProperty(value = "scheduledTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime scheduledTime; + /** * Gets the start time. */ @@ -140,6 +146,15 @@ public ContentLink outputsLink() { return this.outputsLink; } + /** + * Get the scheduledTime value. + * + * @return the scheduledTime value + */ + public DateTime scheduledTime() { + return this.scheduledTime; + } + /** * Get the startTime value. * diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java index 21dc2eec77b..761d57a5bf7 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyCollectionInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.logic.implementation; import java.util.List; +import com.microsoft.azure.management.logic.KeyVaultKey; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -19,7 +20,7 @@ public class KeyVaultKeyCollectionInner { * The key vault keys. */ @JsonProperty(value = "value") - private List value; + private List value; /** * The skip token. @@ -32,7 +33,7 @@ public class KeyVaultKeyCollectionInner { * * @return the value value */ - public List value() { + public List value() { return this.value; } @@ -42,7 +43,7 @@ public List value() { * @param value the value value to set * @return the KeyVaultKeyCollectionInner object itself. */ - public KeyVaultKeyCollectionInner withValue(List value) { + public KeyVaultKeyCollectionInner withValue(List value) { this.value = value; return this; } From 68c5a20d49f0ebf9ff51517bec47494acbbc30c1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 18:04:26 +0000 Subject: [PATCH 06/13] Generated from 76c44cee74fed2876a7250863caf788fd4d2d328 Build fix --- .../azure/management/logic/KeyVaultKeyAttributes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java index de78d7e4aca..69dc4537639 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/KeyVaultKeyAttributes.java @@ -18,7 +18,7 @@ public class KeyVaultKeyAttributes { * Whether the key is enabled or not. */ @JsonProperty(value = "enabled") - private String enabled; + private Boolean enabled; /** * When the key was created. @@ -37,7 +37,7 @@ public class KeyVaultKeyAttributes { * * @return the enabled value */ - public String enabled() { + public Boolean enabled() { return this.enabled; } @@ -47,7 +47,7 @@ public String enabled() { * @param enabled the enabled value to set * @return the KeyVaultKeyAttributes object itself. */ - public KeyVaultKeyAttributes withEnabled(String enabled) { + public KeyVaultKeyAttributes withEnabled(Boolean enabled) { this.enabled = enabled; return this; } From 889df087f2476916944e051287160c516d7eb84e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 22:09:27 +0000 Subject: [PATCH 07/13] Generated from c4f674fe834620b20b8e57310c714a9c32a9f9b4 PR suggestions --- .../logic/implementation/AgreementsInner.java | 8 +- .../IntegrationAccountAssembliesInner.java | 210 +++++++++++++++--- ...rationAccountBatchConfigurationsInner.java | 202 +++++++++++++++-- .../logic/implementation/MapsInner.java | 8 +- .../logic/implementation/PartnersInner.java | 8 +- .../logic/implementation/SchemasInner.java | 8 +- .../implementation/WorkflowTriggersInner.java | 8 +- .../implementation/WorkflowVersionsInner.java | 16 +- .../logic/implementation/WorkflowsInner.java | 16 +- 9 files changed, 400 insertions(+), 84 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java index edb3a29840e..c5693683e10 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/AgreementsInner.java @@ -628,7 +628,7 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -644,7 +644,7 @@ public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGro } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -659,7 +659,7 @@ public ServiceFuture listContentCallbackUrlAsyn } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -678,7 +678,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @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.IntegrationAccountAssemblies listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -86,10 +96,16 @@ interface IntegrationAccountAssembliesService { * @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 AssemblyCollectionInner object if successful. + * @return the PagedList<AssemblyDefinitionInner> object if successful. */ - public AssemblyCollectionInner list(String resourceGroupName, String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String integrationAccountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -101,8 +117,16 @@ public AssemblyCollectionInner list(String resourceGroupName, String integration * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, integrationAccountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -111,15 +135,16 @@ public ServiceFuture listAsync(String resourceGroupName * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AssemblyCollectionInner object + * @return the observable to the PagedList<AssemblyDefinitionInner> object */ - public Observable listAsync(String resourceGroupName, String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, AssemblyCollectionInner>() { - @Override - public AssemblyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -128,9 +153,31 @@ public AssemblyCollectionInner call(ServiceResponse res * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AssemblyCollectionInner object + * @return the observable to the PagedList<AssemblyDefinitionInner> object */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { + return listSinglePageAsync(resourceGroupName, integrationAccountName) + .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 the assemblies for an integration account. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AssemblyDefinitionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -144,12 +191,12 @@ public Observable> listWithServiceRespo throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, integrationAccountName, 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); } @@ -157,9 +204,9 @@ public Observable> call(Response 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); } @@ -453,7 +500,7 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * List the content callback url for an integration account assembly. + * Get the content callback url for an integration account assembly. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -468,7 +515,7 @@ public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGro } /** - * List the content callback url for an integration account assembly. + * Get the content callback url for an integration account assembly. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -482,7 +529,7 @@ public ServiceFuture listContentCallbackUrlAsyn } /** - * List the content callback url for an integration account assembly. + * Get the content callback url for an integration account assembly. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -500,7 +547,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse listContentCallbackUrlD .build(response); } + /** + * List the assemblies for an integration account. + * + * @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<AssemblyDefinitionInner> 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 the assemblies for an integration account. + * + * @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 the assemblies for an integration account. + * + * @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<AssemblyDefinitionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the assemblies for an integration account. + * + * @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<AssemblyDefinitionInner> 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 the assemblies for an integration account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AssemblyDefinitionInner> 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java index c2c3f2e4594..e0eb7439e12 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java @@ -10,12 +10,17 @@ 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 com.microsoft.rest.Validator; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -25,6 +30,7 @@ import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -71,6 +77,10 @@ interface IntegrationAccountBatchConfigurationsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @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.IntegrationAccountBatchConfigurations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -81,10 +91,16 @@ interface IntegrationAccountBatchConfigurationsService { * @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 BatchConfigurationCollectionInner object if successful. + * @return the PagedList<BatchConfigurationInner> object if successful. */ - public BatchConfigurationCollectionInner list(String resourceGroupName, String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); + public PagedList list(final String resourceGroupName, final String integrationAccountName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -96,8 +112,16 @@ public BatchConfigurationCollectionInner list(String resourceGroupName, String i * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); + public ServiceFuture> listAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, integrationAccountName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -106,15 +130,16 @@ public ServiceFuture listAsync(String resourc * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BatchConfigurationCollectionInner object + * @return the observable to the PagedList<BatchConfigurationInner> object */ - public Observable listAsync(String resourceGroupName, String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1, BatchConfigurationCollectionInner>() { - @Override - public BatchConfigurationCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync(final String resourceGroupName, final String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -123,9 +148,31 @@ public BatchConfigurationCollectionInner call(ServiceResponse> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { + return listSinglePageAsync(resourceGroupName, integrationAccountName) + .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 the batch configurations for an integration account. + * + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param integrationAccountName The integration account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -139,12 +186,12 @@ public Observable> listWithSe throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, integrationAccountName, 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); } @@ -152,9 +199,9 @@ public Observable> call(Respo }); } - 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); } @@ -447,4 +494,115 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * List the batch configurations for an integration account. + * + * @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<BatchConfigurationInner> 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 the batch configurations for an integration account. + * + * @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 the batch configurations for an integration account. + * + * @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<BatchConfigurationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * List the batch configurations for an integration account. + * + * @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<BatchConfigurationInner> 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 the batch configurations for an integration account. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BatchConfigurationInner> 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java index 82440f65dbc..02f77ed9a7a 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/MapsInner.java @@ -628,7 +628,7 @@ private ServiceResponse deleteDelegate(Response response) th } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -644,7 +644,7 @@ public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGro } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -659,7 +659,7 @@ public ServiceFuture listContentCallbackUrlAsyn } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -678,7 +678,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse deleteDelegate(Response response) th } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -644,7 +644,7 @@ public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGro } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -659,7 +659,7 @@ public ServiceFuture listContentCallbackUrlAsyn } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -678,7 +678,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse deleteDelegate(Response response) th } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -644,7 +644,7 @@ public WorkflowTriggerCallbackUrlInner listContentCallbackUrl(String resourceGro } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -659,7 +659,7 @@ public ServiceFuture listContentCallbackUrlAsyn } /** - * List content callback url. + * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. @@ -678,7 +678,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse setStateDelegate(Response response) } /** - * Gets the callback URL for a workflow trigger. + * Get the callback URL for a workflow trigger. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -835,7 +835,7 @@ public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, } /** - * Gets the callback URL for a workflow trigger. + * Get the callback URL for a workflow trigger. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -849,7 +849,7 @@ public ServiceFuture listCallbackUrlAsync(Strin } /** - * Gets the callback URL for a workflow trigger. + * Get the callback URL for a workflow trigger. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -867,7 +867,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse getDelegate(Response } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -433,7 +433,7 @@ public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -448,7 +448,7 @@ public ServiceFuture listCallbackUrlAsync(Strin } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -467,7 +467,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse> call(Respons } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -528,7 +528,7 @@ public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -544,7 +544,7 @@ public ServiceFuture listCallbackUrlAsync(Strin } /** - * Lists the callback URL for a trigger of a workflow version. + * Get the callback url for a trigger of a workflow version. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -564,7 +564,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse generateUpgradedDefinitionDelegate(Response listCallbackUrlAsync(Strin } /** - * Lists workflow callback Url. + * Get the workflow callback Url. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. @@ -1346,7 +1346,7 @@ public WorkflowTriggerCallbackUrlInner call(ServiceResponse listSwaggerDelegate(Response respo * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. - * @param move The workflow id to move. + * @param move The workflow to move. * @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 @@ -1497,7 +1497,7 @@ public void move(String resourceGroupName, String workflowName, WorkflowInner mo * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. - * @param move The workflow id to move. + * @param move The workflow to move. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -1511,7 +1511,7 @@ public ServiceFuture moveAsync(String resourceGroupName, String workflowNa * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. - * @param move The workflow id to move. + * @param move The workflow to move. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ @@ -1529,7 +1529,7 @@ public Void call(ServiceResponse response) { * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. - * @param move The workflow id to move. + * @param move The workflow to move. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ From c819092bbe3e56691e04e5ec9c8ed9cfd4242449 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 22:30:22 +0000 Subject: [PATCH 08/13] Generated from 22d36bfae1b0bea69870ac9ca2fc0f881e772829 PR changes --- .../implementation/ExpressionRootInner.java | 44 ++ .../IntegrationAccountsInner.java | 271 +++++++----- .../implementation/KeyVaultKeyInner.java | 70 +++ .../WorkflowRunActionRepetitionsInner.java | 403 ++++++++++++++++-- .../WorkflowRunActionsInner.java | 198 ++++++++- 5 files changed, 815 insertions(+), 171 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionRootInner.java create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyInner.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionRootInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionRootInner.java new file mode 100644 index 00000000000..ecdd7d06c2e --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/ExpressionRootInner.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.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.logic.Expression; + +/** + * The ExpressionRootInner model. + */ +public class ExpressionRootInner extends Expression { + /** + * The path. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the path value. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path value. + * + * @param path the path value to set + * @return the ExpressionRootInner object itself. + */ + public ExpressionRootInner withPath(String path) { + this.path = path; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index 01afc259118..54e74d72477 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -98,7 +98,7 @@ interface IntegrationAccountsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listKeyVaultKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") - Observable> listKeyVaultKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body ListKeyVaultKeysDefinitionInner listKeyVaultKeys, @Query("skipToken") String skipToken, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listKeyVaultKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body ListKeyVaultKeysDefinitionInner listKeyVaultKeys, @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.IntegrationAccounts logTrackingEvents" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents") @@ -116,6 +116,10 @@ interface IntegrationAccountsService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listKeyVaultKeysNext" }) + @GET + Observable> listKeyVaultKeysNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -1024,10 +1028,16 @@ private ServiceResponse listCallbackUrlDelegate(Response listKeyVaultKeys(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + ServiceResponse> response = listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -1040,8 +1050,16 @@ public KeyVaultKeyCollectionInner listKeyVaultKeys(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys), serviceCallback); + public ServiceFuture> listKeyVaultKeysAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listKeyVaultKeysNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -1051,15 +1069,16 @@ public ServiceFuture listKeyVaultKeysAsync(String re * @param integrationAccountName The integration account name. * @param listKeyVaultKeys The key vault parameters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KeyVaultKeyCollectionInner object + * @return the observable to the PagedList<KeyVaultKeyInner> object */ - public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { - return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).map(new Func1, KeyVaultKeyCollectionInner>() { - @Override - public KeyVaultKeyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listKeyVaultKeysAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -1069,36 +1088,18 @@ public KeyVaultKeyCollectionInner call(ServiceResponse> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { - 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 (integrationAccountName == null) { - throw new IllegalArgumentException("Parameter integrationAccountName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (listKeyVaultKeys == null) { - throw new IllegalArgumentException("Parameter listKeyVaultKeys is required and cannot be null."); - } - Validator.validate(listKeyVaultKeys); - final String skipToken = null; - return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, skipToken, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + public Observable>> listKeyVaultKeysWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + return listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = listKeyVaultKeysDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); } + return Observable.just(page).concatWith(listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1106,64 +1107,13 @@ public Observable> call(Response listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, skipToken), serviceCallback); - } - - /** - * Gets the integration account's Key Vault keys. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param listKeyVaultKeys The key vault parameters. - * @param skipToken The skip token. + ServiceResponse> * @param resourceGroupName The resource group name. + ServiceResponse> * @param integrationAccountName The integration account name. + ServiceResponse> * @param listKeyVaultKeys The key vault parameters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KeyVaultKeyCollectionInner object + * @return the PagedList<KeyVaultKeyInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken) { - return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, skipToken).map(new Func1, KeyVaultKeyCollectionInner>() { - @Override - public KeyVaultKeyCollectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the integration account's Key Vault keys. - * - * @param resourceGroupName The resource group name. - * @param integrationAccountName The integration account name. - * @param listKeyVaultKeys The key vault parameters. - * @param skipToken The skip token. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the KeyVaultKeyCollectionInner object - */ - public Observable> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, String skipToken) { + public Observable>> listKeyVaultKeysSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1180,13 +1130,13 @@ public Observable> listKeyVaultKeysW throw new IllegalArgumentException("Parameter listKeyVaultKeys is required and cannot be null."); } Validator.validate(listKeyVaultKeys); - return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, skipToken, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listKeyVaultKeysDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listKeyVaultKeysDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1194,9 +1144,9 @@ public Observable> call(Response listKeyVaultKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listKeyVaultKeysDelegate(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); } @@ -1690,4 +1640,115 @@ private ServiceResponse> listByResourceGroupNe .build(response); } + /** + * Gets the integration account's Key Vault keys. + * + * @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<KeyVaultKeyInner> object if successful. + */ + public PagedList listKeyVaultKeysNext(final String nextPageLink) { + ServiceResponse> response = listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets the integration account's Key Vault keys. + * + * @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> listKeyVaultKeysNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listKeyVaultKeysNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listKeyVaultKeysNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @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<KeyVaultKeyInner> object + */ + public Observable> listKeyVaultKeysNextAsync(final String nextPageLink) { + return listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + * @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<KeyVaultKeyInner> object + */ + public Observable>> listKeyVaultKeysNextWithServiceResponseAsync(final String nextPageLink) { + return listKeyVaultKeysNextSinglePageAsync(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(listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets the integration account's Key Vault keys. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<KeyVaultKeyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listKeyVaultKeysNextSinglePageAsync(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.listKeyVaultKeysNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listKeyVaultKeysNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listKeyVaultKeysNextDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyInner.java new file mode 100644 index 00000000000..464538179fc --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/KeyVaultKeyInner.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.implementation; + +import com.microsoft.azure.management.logic.KeyVaultKeyAttributes; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The key vault key. + */ +public class KeyVaultKeyInner { + /** + * The key id. + */ + @JsonProperty(value = "kid") + private String kid; + + /** + * The key attributes. + */ + @JsonProperty(value = "attributes") + private KeyVaultKeyAttributes attributes; + + /** + * Get the kid value. + * + * @return the kid value + */ + public String kid() { + return this.kid; + } + + /** + * Set the kid value. + * + * @param kid the kid value to set + * @return the KeyVaultKeyInner object itself. + */ + public KeyVaultKeyInner withKid(String kid) { + this.kid = kid; + return this; + } + + /** + * Get the attributes value. + * + * @return the attributes value + */ + public KeyVaultKeyAttributes attributes() { + return this.attributes; + } + + /** + * Set the attributes value. + * + * @param attributes the attributes value to set + * @return the KeyVaultKeyInner object itself. + */ + public KeyVaultKeyInner withAttributes(KeyVaultKeyAttributes attributes) { + this.attributes = attributes; + return this; + } + +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java index 9be90e8f46c..945946262c9 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java @@ -10,11 +10,16 @@ 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; @@ -22,6 +27,7 @@ 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; @@ -64,6 +70,14 @@ interface WorkflowRunActionRepetitionsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces") Observable> listExpressionTraces(@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.WorkflowRunActionRepetitions listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActionRepetitions listExpressionTracesNext" }) + @GET + Observable> listExpressionTracesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -76,10 +90,16 @@ interface WorkflowRunActionRepetitionsService { * @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 WorkflowRunActionRepetitionDefinitionCollectionInner object if successful. + * @return the PagedList<WorkflowRunActionRepetitionDefinitionInner> object if successful. */ - public WorkflowRunActionRepetitionDefinitionCollectionInner 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(); + } + }; } /** @@ -93,8 +113,16 @@ public WorkflowRunActionRepetitionDefinitionCollectionInner list(String resource * @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); } /** @@ -105,15 +133,16 @@ public ServiceFuture listA * @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 WorkflowRunActionRepetitionDefinitionCollectionInner object + * @return the observable to the PagedList<WorkflowRunActionRepetitionDefinitionInner> object */ - public Observable listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, WorkflowRunActionRepetitionDefinitionCollectionInner>() { - @Override - public WorkflowRunActionRepetitionDefinitionCollectionInner 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(); + } + }); } /** @@ -124,9 +153,33 @@ public WorkflowRunActionRepetitionDefinitionCollectionInner call(ServiceResponse * @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 WorkflowRunActionRepetitionDefinitionCollectionInner object + * @return the observable to the PagedList<WorkflowRunActionRepetitionDefinitionInner> object */ - public Observable> 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)); + } + }); + } + + /** + * Get all of a workflow run action repetitions. + * + 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<WorkflowRunActionRepetitionDefinitionInner> 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."); } @@ -146,12 +199,12 @@ public Observable, 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); } @@ -159,9 +212,9 @@ public Observable 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); } @@ -284,10 +337,16 @@ private ServiceResponse getDelegate( * @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 ExpressionTracesInner object if successful. + * @return the PagedList<ExpressionRootInner> object if successful. */ - public ExpressionTracesInner listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); + public PagedList listExpressionTraces(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + ServiceResponse> response = listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -302,8 +361,16 @@ public ExpressionTracesInner listExpressionTraces(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); + public ServiceFuture> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -315,15 +382,16 @@ public ServiceFuture listExpressionTracesAsync(String res * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressionTracesInner object + * @return the observable to the PagedList<ExpressionRootInner> object */ - public Observable listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1, ExpressionTracesInner>() { - @Override - public ExpressionTracesInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -335,9 +403,34 @@ public ExpressionTracesInner call(ServiceResponse respons * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressionTracesInner object + * @return the observable to the PagedList<ExpressionRootInner> object + */ + public Observable>> listExpressionTracesWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + return listExpressionTracesSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + 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<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listExpressionTracesWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + public Observable>> listExpressionTracesSinglePageAsync(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."); } @@ -360,12 +453,234 @@ public Observable> listExpressionTracesWi throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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 = listExpressionTracesDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listExpressionTracesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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<WorkflowRunActionRepetitionDefinitionInner> 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(); + } + }; + } + + /** + * Get all of a workflow run action repetitions. + * + * @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); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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<WorkflowRunActionRepetitionDefinitionInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get all of a workflow run action repetitions. + * + * @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<WorkflowRunActionRepetitionDefinitionInner> 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)); + } + }); + } + + /** + * Get all of a workflow run action repetitions. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<WorkflowRunActionRepetitionDefinitionInner> 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); + } + + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object if successful. + */ + public PagedList listExpressionTracesNext(final String nextPageLink) { + ServiceResponse> response = listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists a workflow run expression trace. + * + * @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> listExpressionTracesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExpressionTracesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object + */ + public Observable> listExpressionTracesNextAsync(final String nextPageLink) { + return listExpressionTracesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object + */ + public Observable>> listExpressionTracesNextWithServiceResponseAsync(final String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExpressionTracesNextSinglePageAsync(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.listExpressionTracesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExpressionTracesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -373,9 +688,9 @@ public Observable> call(Response listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listExpressionTracesNextDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java index cc1229eaa30..7620a348186 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java @@ -74,6 +74,10 @@ interface WorkflowRunActionsService { @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActions listExpressionTracesNext" }) + @GET + Observable> listExpressionTracesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -453,10 +457,16 @@ private ServiceResponse getDelegate(Response listExpressionTraces(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + ServiceResponse> response = listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** @@ -470,8 +480,16 @@ public ExpressionTracesInner listExpressionTraces(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); + public ServiceFuture> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -482,15 +500,16 @@ public ServiceFuture listExpressionTracesAsync(String res * @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 ExpressionTracesInner object + * @return the observable to the PagedList<ExpressionRootInner> object */ - public Observable listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1, ExpressionTracesInner>() { - @Override - public ExpressionTracesInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -501,9 +520,33 @@ public ExpressionTracesInner call(ServiceResponse respons * @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 ExpressionTracesInner object + * @return the observable to the PagedList<ExpressionRootInner> object + */ + public Observable>> listExpressionTracesWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + return listExpressionTracesSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + 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<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> listExpressionTracesWithServiceResponseAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + public Observable>> listExpressionTracesSinglePageAsync(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."); } @@ -523,12 +566,12 @@ public Observable> listExpressionTracesWi throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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 = listExpressionTracesDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listExpressionTracesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -536,9 +579,9 @@ public Observable> call(Response listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listExpressionTracesDelegate(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); } @@ -654,4 +697,115 @@ private ServiceResponse> listNextDelegate(Respo .build(response); } + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object if successful. + */ + public PagedList listExpressionTracesNext(final String nextPageLink) { + ServiceResponse> response = listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists a workflow run expression trace. + * + * @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> listExpressionTracesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listExpressionTracesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object + */ + public Observable> listExpressionTracesNextAsync(final String nextPageLink) { + return listExpressionTracesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + * @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<ExpressionRootInner> object + */ + public Observable>> listExpressionTracesNextWithServiceResponseAsync(final String nextPageLink) { + return listExpressionTracesNextSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists a workflow run expression trace. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listExpressionTracesNextSinglePageAsync(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.listExpressionTracesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listExpressionTracesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listExpressionTracesNextDelegate(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 7c3248240a3a9fd5929c07815814008f7e615256 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 23:06:42 +0000 Subject: [PATCH 09/13] Generated from 640439bc03180e460bb25ec8e963832b341ac1fa Fix for R2025 error --- .../IntegrationAccountAssembliesInner.java | 202 +-------- ...rationAccountBatchConfigurationsInner.java | 202 +-------- .../IntegrationAccountsInner.java | 198 +-------- .../logic/implementation/PageImpl1.java | 75 ++++ .../WorkflowRunActionRepetitionsInner.java | 404 ++---------------- .../WorkflowRunActionsInner.java | 199 +-------- 6 files changed, 213 insertions(+), 1067 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java index cfcbce0cf55..7dddae5d1b7 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java @@ -10,11 +10,7 @@ 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; @@ -31,7 +27,6 @@ import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; -import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -82,10 +77,6 @@ interface IntegrationAccountAssembliesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl") Observable> listContentCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("assemblyArtifactName") String assemblyArtifactName, @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.IntegrationAccountAssemblies listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -96,16 +87,10 @@ interface IntegrationAccountAssembliesService { * @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<AssemblyDefinitionInner> object if successful. + * @return the List<AssemblyDefinitionInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public List list(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); } /** @@ -117,16 +102,8 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture> listAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); } /** @@ -135,16 +112,15 @@ public Observable>> call(String ne * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<AssemblyDefinitionInner> object + * @return the observable to the List<AssemblyDefinitionInner> object */ - public Observable> listAsync(final String resourceGroupName, final String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable> listAsync(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -153,31 +129,9 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listSinglePageAsync(resourceGroupName, integrationAccountName) - .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 the assemblies for an integration account. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AssemblyDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -191,12 +145,13 @@ public Observable>> listSinglePage throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, integrationAccountName, 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> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -204,9 +159,9 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } @@ -592,115 +547,4 @@ private ServiceResponse listContentCallbackUrlD .build(response); } - /** - * List the assemblies for an integration account. - * - * @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<AssemblyDefinitionInner> 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 the assemblies for an integration account. - * - * @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 the assemblies for an integration account. - * - * @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<AssemblyDefinitionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List the assemblies for an integration account. - * - * @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<AssemblyDefinitionInner> 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 the assemblies for an integration account. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<AssemblyDefinitionInner> 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java index e0eb7439e12..ae5fb598e3a 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java @@ -10,11 +10,7 @@ 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; @@ -30,7 +26,6 @@ import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; -import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -77,10 +72,6 @@ interface IntegrationAccountBatchConfigurationsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @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.IntegrationAccountBatchConfigurations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -91,16 +82,10 @@ interface IntegrationAccountBatchConfigurationsService { * @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<BatchConfigurationInner> object if successful. + * @return the List<BatchConfigurationInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String integrationAccountName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, integrationAccountName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public List list(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).toBlocking().single().body(); } /** @@ -112,16 +97,8 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final String resourceGroupName, final String integrationAccountName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, integrationAccountName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture> listAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); } /** @@ -130,16 +107,15 @@ public Observable>> call(String ne * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<BatchConfigurationInner> object + * @return the observable to the List<BatchConfigurationInner> object */ - public Observable> listAsync(final String resourceGroupName, final String integrationAccountName) { - return listWithServiceResponseAsync(resourceGroupName, integrationAccountName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable> listAsync(String resourceGroupName, String integrationAccountName) { + return listWithServiceResponseAsync(resourceGroupName, integrationAccountName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -148,31 +124,9 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName) { - return listSinglePageAsync(resourceGroupName, integrationAccountName) - .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 the batch configurations for an integration account. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BatchConfigurationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String integrationAccountName) { + public Observable>> listWithServiceResponseAsync(String resourceGroupName, String integrationAccountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -186,12 +140,13 @@ public Observable>> listSinglePage throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.list(this.client.subscriptionId(), resourceGroupName, integrationAccountName, 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> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -199,9 +154,9 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } @@ -494,115 +449,4 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } - /** - * List the batch configurations for an integration account. - * - * @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<BatchConfigurationInner> 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 the batch configurations for an integration account. - * - * @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 the batch configurations for an integration account. - * - * @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<BatchConfigurationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List the batch configurations for an integration account. - * - * @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<BatchConfigurationInner> 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 the batch configurations for an integration account. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<BatchConfigurationInner> 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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index 54e74d72477..4267c61314b 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -116,10 +116,6 @@ interface IntegrationAccountsService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts listKeyVaultKeysNext" }) - @GET - Observable> listKeyVaultKeysNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -1028,16 +1024,10 @@ private ServiceResponse listCallbackUrlDelegate(Response listKeyVaultKeys(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { - ServiceResponse> response = listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public List listKeyVaultKeys(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).toBlocking().single().body(); } /** @@ -1050,16 +1040,8 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listKeyVaultKeysAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listKeyVaultKeysNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture> listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys), serviceCallback); } /** @@ -1069,16 +1051,15 @@ public Observable>> call(String nextPageL * @param integrationAccountName The integration account name. * @param listKeyVaultKeys The key vault parameters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KeyVaultKeyInner> object + * @return the observable to the List<KeyVaultKeyInner> object */ - public Observable> listKeyVaultKeysAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { - return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable> listKeyVaultKeysAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + return listKeyVaultKeysWithServiceResponseAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -1088,32 +1069,9 @@ public Page call(ServiceResponse> respo * @param integrationAccountName The integration account name. * @param listKeyVaultKeys The key vault parameters. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<KeyVaultKeyInner> object - */ - public Observable>> listKeyVaultKeysWithServiceResponseAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { - return listKeyVaultKeysSinglePageAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys) - .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(listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the integration account's Key Vault keys. - * - ServiceResponse> * @param resourceGroupName The resource group name. - ServiceResponse> * @param integrationAccountName The integration account name. - ServiceResponse> * @param listKeyVaultKeys The key vault parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<KeyVaultKeyInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the List<KeyVaultKeyInner> object */ - public Observable>> listKeyVaultKeysSinglePageAsync(final String resourceGroupName, final String integrationAccountName, final ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { + public Observable>> listKeyVaultKeysWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, ListKeyVaultKeysDefinitionInner listKeyVaultKeys) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1131,12 +1089,13 @@ public Observable>> listKeyVaultKeysSingl } Validator.validate(listKeyVaultKeys); return service.listKeyVaultKeys(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), listKeyVaultKeys, 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> result = listKeyVaultKeysDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listKeyVaultKeysDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1144,9 +1103,9 @@ public Observable>> call(Response> listKeyVaultKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listKeyVaultKeysDelegate(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); } @@ -1640,115 +1599,4 @@ private ServiceResponse> listByResourceGroupNe .build(response); } - /** - * Gets the integration account's Key Vault keys. - * - * @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<KeyVaultKeyInner> object if successful. - */ - public PagedList listKeyVaultKeysNext(final String nextPageLink) { - ServiceResponse> response = listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listKeyVaultKeysNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets the integration account's Key Vault keys. - * - * @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> listKeyVaultKeysNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listKeyVaultKeysNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listKeyVaultKeysNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets the integration account's Key Vault keys. - * - * @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<KeyVaultKeyInner> object - */ - public Observable> listKeyVaultKeysNextAsync(final String nextPageLink) { - return listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets the integration account's Key Vault keys. - * - * @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<KeyVaultKeyInner> object - */ - public Observable>> listKeyVaultKeysNextWithServiceResponseAsync(final String nextPageLink) { - return listKeyVaultKeysNextSinglePageAsync(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(listKeyVaultKeysNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets the integration account's Key Vault keys. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<KeyVaultKeyInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listKeyVaultKeysNextSinglePageAsync(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.listKeyVaultKeysNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listKeyVaultKeysNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listKeyVaultKeysNextDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java new file mode 100644 index 00000000000..77bdd771d3b --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * 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.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java index 945946262c9..2665bbd9130 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java @@ -10,11 +10,7 @@ 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; @@ -27,7 +23,6 @@ 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; @@ -70,14 +65,6 @@ interface WorkflowRunActionRepetitionsService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces") Observable> listExpressionTraces(@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.WorkflowRunActionRepetitions listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActionRepetitions listExpressionTracesNext" }) - @GET - Observable> listExpressionTracesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -90,16 +77,10 @@ interface WorkflowRunActionRepetitionsService { * @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<WorkflowRunActionRepetitionDefinitionInner> object if successful. + * @return the List<WorkflowRunActionRepetitionDefinitionInner> object if successful. */ - 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(); - } - }; + public List list(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); } /** @@ -113,16 +94,8 @@ public Page nextPage(String nextPage * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - 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); + public ServiceFuture> listAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); } /** @@ -133,16 +106,15 @@ 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(); - } - }); + public Observable> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -153,33 +125,9 @@ public Page call(ServiceResponse>> 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)); - } - }); - } - - /** - * Get all of a workflow run action repetitions. - * - 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<WorkflowRunActionRepetitionDefinitionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + 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."); } @@ -199,12 +147,13 @@ public Observable, Observable>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -212,9 +161,9 @@ public Observable> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } @@ -337,16 +286,10 @@ private ServiceResponse getDelegate( * @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<ExpressionRootInner> object if successful. + * @return the List<ExpressionRootInner> object if successful. */ - public PagedList listExpressionTraces(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { - ServiceResponse> response = listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public List listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).toBlocking().single().body(); } /** @@ -361,16 +304,8 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName), serviceCallback); } /** @@ -382,16 +317,15 @@ public Observable>> call(String nextPa * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressionRootInner> object + * @return the observable to the List<ExpressionRootInner> object */ - public Observable> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, String repetitionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -403,34 +337,9 @@ public Page call(ServiceResponse> * @param actionName The workflow action name. * @param repetitionName The workflow repetition. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressionRootInner> object - */ - public Observable>> listExpressionTracesWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { - return listExpressionTracesSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - 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<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the List<ExpressionRootInner> object */ - public Observable>> listExpressionTracesSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final String repetitionName) { + public Observable>> listExpressionTracesWithServiceResponseAsync(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."); } @@ -453,234 +362,13 @@ public Observable>> listExpressionTrac throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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> result = listExpressionTracesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Get all of a workflow run action repetitions. - * - * @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<WorkflowRunActionRepetitionDefinitionInner> 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(); - } - }; - } - - /** - * Get all of a workflow run action repetitions. - * - * @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); - } - - /** - * Get all of a workflow run action repetitions. - * - * @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<WorkflowRunActionRepetitionDefinitionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get all of a workflow run action repetitions. - * - * @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<WorkflowRunActionRepetitionDefinitionInner> 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)); - } - }); - } - - /** - * Get all of a workflow run action repetitions. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<WorkflowRunActionRepetitionDefinitionInner> 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); - } - - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object if successful. - */ - public PagedList listExpressionTracesNext(final String nextPageLink) { - ServiceResponse> response = listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a workflow run expression trace. - * - * @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> listExpressionTracesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listExpressionTracesNextSinglePageAsync(nextPageLink), - new Func1>>>() { + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object - */ - public Observable> listExpressionTracesNextAsync(final String nextPageLink) { - return listExpressionTracesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object - */ - public Observable>> listExpressionTracesNextWithServiceResponseAsync(final String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listExpressionTracesNextSinglePageAsync(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.listExpressionTracesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listExpressionTracesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listExpressionTracesDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -688,9 +376,9 @@ public Observable>> call(Response> listExpressionTracesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listExpressionTracesDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java index 7620a348186..05fa15b2d2b 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionsInner.java @@ -74,10 +74,6 @@ interface WorkflowRunActionsService { @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.WorkflowRunActions listExpressionTracesNext" }) - @GET - Observable> listExpressionTracesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -457,16 +453,10 @@ private ServiceResponse getDelegate(Response listExpressionTraces(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { - ServiceResponse> response = listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public List listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); } /** @@ -480,16 +470,8 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listExpressionTracesSinglePageAsync(resourceGroupName, workflowName, runName, actionName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName), serviceCallback); } /** @@ -500,16 +482,15 @@ public Observable>> call(String nextPa * @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 PagedList<ExpressionRootInner> object + * @return the observable to the List<ExpressionRootInner> object */ - public Observable> listExpressionTracesAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { - return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public Observable> listExpressionTracesAsync(String resourceGroupName, String workflowName, String runName, String actionName) { + return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -520,33 +501,9 @@ public Page call(ServiceResponse> * @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 PagedList<ExpressionRootInner> object - */ - public Observable>> listExpressionTracesWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { - return listExpressionTracesSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - 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<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the List<ExpressionRootInner> object */ - public Observable>> listExpressionTracesSinglePageAsync(final String resourceGroupName, final String workflowName, final String runName, final String actionName) { + public Observable>> listExpressionTracesWithServiceResponseAsync(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."); } @@ -566,12 +523,13 @@ public Observable>> listExpressionTrac throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listExpressionTraces(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> result = listExpressionTracesDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listExpressionTracesDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -579,9 +537,9 @@ public Observable>> call(Response> listExpressionTracesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listExpressionTracesDelegate(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); } @@ -697,115 +655,4 @@ private ServiceResponse> listNextDelegate(Respo .build(response); } - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object if successful. - */ - public PagedList listExpressionTracesNext(final String nextPageLink) { - ServiceResponse> response = listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists a workflow run expression trace. - * - * @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> listExpressionTracesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listExpressionTracesNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object - */ - public Observable> listExpressionTracesNextAsync(final String nextPageLink) { - return listExpressionTracesNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - * @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<ExpressionRootInner> object - */ - public Observable>> listExpressionTracesNextWithServiceResponseAsync(final String nextPageLink) { - return listExpressionTracesNextSinglePageAsync(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(listExpressionTracesNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists a workflow run expression trace. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressionRootInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listExpressionTracesNextSinglePageAsync(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.listExpressionTracesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listExpressionTracesNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listExpressionTracesNextDelegate(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 da48223db2c181b65b73e897f74dea7636d06c07 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 30 Apr 2018 23:54:06 +0000 Subject: [PATCH 10/13] Generated from 6a45564659743f3dc45e39ca9aa5fb1a58720765 Added item name --- .../IntegrationAccountAssembliesInner.java | 8 +- ...rationAccountBatchConfigurationsInner.java | 8 +- .../IntegrationAccountsInner.java | 8 +- .../logic/implementation/PageImpl1.java | 2 +- .../logic/implementation/PageImpl2.java | 75 +++++++++++++++++++ .../WorkflowRunActionRepetitionsInner.java | 8 +- 6 files changed, 92 insertions(+), 17 deletions(-) create mode 100644 azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl2.java diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java index 7dddae5d1b7..0761f90e8e7 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountAssembliesInner.java @@ -149,7 +149,7 @@ public Observable>> listWithServic @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); return Observable.just(clientResponse); } catch (Throwable t) { @@ -159,9 +159,9 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java index ae5fb598e3a..45c7244e7aa 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java @@ -144,7 +144,7 @@ public Observable>> listWithServic @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); return Observable.just(clientResponse); } catch (Throwable t) { @@ -154,9 +154,9 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index 4267c61314b..a8bb025fe7c 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -1093,7 +1093,7 @@ public Observable>> listKeyVaultKeysWithS @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listKeyVaultKeysDelegate(response); + ServiceResponse> result = listKeyVaultKeysDelegate(response); ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); return Observable.just(clientResponse); } catch (Throwable t) { @@ -1103,9 +1103,9 @@ public Observable>> call(Response> listKeyVaultKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listKeyVaultKeysDelegate(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/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java index 77bdd771d3b..4b1f7309676 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl1.java @@ -28,7 +28,7 @@ public class PageImpl1 implements Page { /** * The list of items. */ - @JsonProperty("value") + @JsonProperty("inputs") private List items; /** diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl2.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl2.java new file mode 100644 index 00000000000..30f7f471988 --- /dev/null +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/PageImpl2.java @@ -0,0 +1,75 @@ +/** + * 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.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl2 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl2 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl2 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java index 2665bbd9130..196db3e4aa0 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowRunActionRepetitionsInner.java @@ -151,7 +151,7 @@ public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listDelegate(response); ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); return Observable.just(clientResponse); } catch (Throwable t) { @@ -161,9 +161,9 @@ public Observable> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>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); } From df94daf4f30213d33bda83e7064d05bd930bdff6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 1 May 2018 00:26:57 +0000 Subject: [PATCH 11/13] Generated from b47ff893bac3a965d595041006c55306755be481 Revert breaking SDK change --- .../IntegrationAccountsInner.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java index a8bb025fe7c..cc559ff4983 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountsInner.java @@ -92,9 +92,9 @@ interface IntegrationAccountsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @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.IntegrationAccounts listCallbackUrl" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccounts getCallbackUrl" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl") - Observable> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Query("api-version") String apiVersion, @Body GetCallbackUrlParametersInner parameters, @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.IntegrationAccounts listKeyVaultKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") @@ -932,8 +932,8 @@ private ServiceResponse deleteDelegate(Response response) th * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the CallbackUrlInner object if successful. */ - public CallbackUrlInner listCallbackUrl(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); + public CallbackUrlInner getCallbackUrl(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).toBlocking().single().body(); } /** @@ -946,8 +946,8 @@ public CallbackUrlInner listCallbackUrl(String resourceGroupName, String integra * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); + public ServiceFuture getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters), serviceCallback); } /** @@ -959,8 +959,8 @@ public ServiceFuture listCallbackUrlAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CallbackUrlInner object */ - public Observable listCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { - return listCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, CallbackUrlInner>() { + public Observable getCallbackUrlAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + return getCallbackUrlWithServiceResponseAsync(resourceGroupName, integrationAccountName, parameters).map(new Func1, CallbackUrlInner>() { @Override public CallbackUrlInner call(ServiceResponse response) { return response.body(); @@ -977,7 +977,7 @@ public CallbackUrlInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CallbackUrlInner object */ - public Observable> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { + public Observable> getCallbackUrlWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, GetCallbackUrlParametersInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -994,12 +994,12 @@ public Observable> listCallbackUrlWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + return service.getCallbackUrl(this.client.subscriptionId(), resourceGroupName, integrationAccountName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = listCallbackUrlDelegate(response); + ServiceResponse clientResponse = getCallbackUrlDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1008,7 +1008,7 @@ public Observable> call(Response }); } - private ServiceResponse listCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getCallbackUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) From cb6c7040fe7974e5fe28173965a47116bd0e52b8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 1 May 2018 00:47:08 +0000 Subject: [PATCH 12/13] Generated from 53e67250f5d822225188d67d87b4ce15828fc84b Kick the build after error --- .../management/logic/AS2AcknowledgementConnectionSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java index 4a195cd729d..e93bb0c56ae 100755 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/AS2AcknowledgementConnectionSettings.java @@ -11,7 +11,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * The AS2 agreement acknowledegment connection settings. + * The AS2 agreement acknowledgement connection settings. */ public class AS2AcknowledgementConnectionSettings { /** From 4807130b4a0dc1f25fe9c98cb1b797e3cc2b9378 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 3 May 2018 17:41:48 +0000 Subject: [PATCH 13/13] Generated from f4db3d44f85abdbf447718ebc11389082bee5600 Merge branch 'update-microsoftlogic-namespace' of https://github.com/refortie/azure-rest-api-specs into update-microsoftlogic-namespace --- ...rationAccountBatchConfigurationsInner.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java index 45c7244e7aa..b0ce21cbca0 100644 --- a/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java +++ b/azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/IntegrationAccountBatchConfigurationsInner.java @@ -66,7 +66,7 @@ interface IntegrationAccountBatchConfigurationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.IntegrationAccountBatchConfigurations createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") - Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @Body BatchConfigurationInner assemblyArtifact, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("integrationAccountName") String integrationAccountName, @Path("batchConfigurationName") String batchConfigurationName, @Body BatchConfigurationInner batchConfiguration, @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.IntegrationAccountBatchConfigurations delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}", method = "DELETE", hasBody = true) @@ -260,14 +260,14 @@ private ServiceResponse getDelegate(Response createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact), serviceCallback); + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration), serviceCallback); } /** @@ -291,12 +291,12 @@ public ServiceFuture createOrUpdateAsync(String resourc * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @param batchConfigurationName The batch configuration name. - * @param assemblyArtifact The assembly artifact. + * @param batchConfiguration The batch configuration. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchConfigurationInner object */ - public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact).map(new Func1, BatchConfigurationInner>() { + public Observable createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration).map(new Func1, BatchConfigurationInner>() { @Override public BatchConfigurationInner call(ServiceResponse response) { return response.body(); @@ -310,11 +310,11 @@ public BatchConfigurationInner call(ServiceResponse res * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @param batchConfigurationName The batch configuration name. - * @param assemblyArtifact The assembly artifact. + * @param batchConfiguration The batch configuration. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BatchConfigurationInner object */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner assemblyArtifact) { + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -327,14 +327,14 @@ public Observable> createOrUpdateWithSe if (batchConfigurationName == null) { throw new IllegalArgumentException("Parameter batchConfigurationName is required and cannot be null."); } - if (assemblyArtifact == null) { - throw new IllegalArgumentException("Parameter assemblyArtifact is required and cannot be null."); + if (batchConfiguration == null) { + throw new IllegalArgumentException("Parameter batchConfiguration is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - Validator.validate(assemblyArtifact); - return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, batchConfigurationName, assemblyArtifact, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(batchConfiguration); + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) {