diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAgreementsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAgreementsOperations.cs new file mode 100644 index 000000000000..1d665ba189da --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAgreementsOperations.cs @@ -0,0 +1,188 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountAgreementsOperations operations. + /// + public partial interface IIntegrationAccountAgreementsOperations + { + /// + /// Gets a list of integration account agreements. + /// + /// + /// Gets a list of integration account agreements. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account agreement. + /// + /// + /// Gets an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account agreement. + /// + /// + /// Creates or updates an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The integration account agreement. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, IntegrationAccountAgreement agreement, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account agreement. + /// + /// + /// Deletes an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the content callback url. + /// + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account agreements. + /// + /// + /// Gets a list of integration account agreements. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAssembliesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAssembliesOperations.cs new file mode 100644 index 000000000000..337fd770f3f3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountAssembliesOperations.cs @@ -0,0 +1,159 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountAssembliesOperations operations. + /// + public partial interface IIntegrationAccountAssembliesOperations + { + /// + /// List the assemblies for an integration account. + /// + /// + /// List the assemblies for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get an assembly for an integration account. + /// + /// + /// Get an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create or update an assembly for an integration account. + /// + /// + /// Create or update an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The assembly artifact. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, AssemblyDefinition assemblyArtifact, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete an assembly for an integration account. + /// + /// + /// Delete an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the content callback url for an integration account assembly. + /// + /// + /// Get the content callback url for an integration account assembly. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountBatchConfigurationsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountBatchConfigurationsOperations.cs new file mode 100644 index 000000000000..c68e1da2a4d3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountBatchConfigurationsOperations.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountBatchConfigurationsOperations operations. + /// + public partial interface IIntegrationAccountBatchConfigurationsOperations + { + /// + /// List the batch configurations for an integration account. + /// + /// + /// List the batch configurations for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a batch configuration for an integration account. + /// + /// + /// Get a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create or update a batch configuration for an integration account. + /// + /// + /// Create or update a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The batch configuration. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, BatchConfiguration batchConfiguration, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete a batch configuration for an integration account. + /// + /// + /// Delete a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountCertificatesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountCertificatesOperations.cs new file mode 100644 index 000000000000..afb16824b0ea --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountCertificatesOperations.cs @@ -0,0 +1,156 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountCertificatesOperations operations. + /// + public partial interface IIntegrationAccountCertificatesOperations + { + /// + /// Gets a list of integration account certificates. + /// + /// + /// Gets a list of integration account certificates. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account certificate. + /// + /// + /// Gets an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account certificate. + /// + /// + /// Creates or updates an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The integration account certificate. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, IntegrationAccountCertificate certificate, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account certificate. + /// + /// + /// Deletes an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account certificates. + /// + /// + /// Gets a list of integration account certificates. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountMapsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountMapsOperations.cs new file mode 100644 index 000000000000..f87d3bfeb53d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountMapsOperations.cs @@ -0,0 +1,188 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountMapsOperations operations. + /// + public partial interface IIntegrationAccountMapsOperations + { + /// + /// Gets a list of integration account maps. + /// + /// + /// Gets a list of integration account maps. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account map. + /// + /// + /// Gets an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account map. + /// + /// + /// Creates or updates an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The integration account map. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, IntegrationAccountMap map, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account map. + /// + /// + /// Deletes an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the content callback url. + /// + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account maps. + /// + /// + /// Gets a list of integration account maps. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountPartnersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountPartnersOperations.cs new file mode 100644 index 000000000000..688f234861e4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountPartnersOperations.cs @@ -0,0 +1,188 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountPartnersOperations operations. + /// + public partial interface IIntegrationAccountPartnersOperations + { + /// + /// Gets a list of integration account partners. + /// + /// + /// Gets a list of integration account partners. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account partner. + /// + /// + /// Gets an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account partner. + /// + /// + /// Creates or updates an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The integration account partner. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, IntegrationAccountPartner partner, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account partner. + /// + /// + /// Deletes an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the content callback url. + /// + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account partners. + /// + /// + /// Gets a list of integration account partners. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSchemasOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSchemasOperations.cs new file mode 100644 index 000000000000..e80ba5d3a281 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSchemasOperations.cs @@ -0,0 +1,188 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountSchemasOperations operations. + /// + public partial interface IIntegrationAccountSchemasOperations + { + /// + /// Gets a list of integration account schemas. + /// + /// + /// Gets a list of integration account schemas. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account schema. + /// + /// + /// Gets an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account schema. + /// + /// + /// Creates or updates an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The integration account schema. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, IntegrationAccountSchema schema, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account schema. + /// + /// + /// Deletes an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the content callback url. + /// + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account schemas. + /// + /// + /// Gets a list of integration account schemas. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSessionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSessionsOperations.cs new file mode 100644 index 000000000000..2dacb76997d6 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountSessionsOperations.cs @@ -0,0 +1,156 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountSessionsOperations operations. + /// + public partial interface IIntegrationAccountSessionsOperations + { + /// + /// Gets a list of integration account sessions. + /// + /// + /// Gets a list of integration account sessions. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account session. + /// + /// + /// Gets an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account session. + /// + /// + /// Creates or updates an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The integration account session. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, IntegrationAccountSession session, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account session. + /// + /// + /// Deletes an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration account sessions. + /// + /// + /// Gets a list of integration account sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountsOperations.cs new file mode 100644 index 000000000000..2bf5575c7650 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IIntegrationAccountsOperations.cs @@ -0,0 +1,332 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountsOperations operations. + /// + public partial interface IIntegrationAccountsOperations + { + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The resource group name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an integration account. + /// + /// + /// Gets an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates an integration account. + /// + /// + /// Creates or updates an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Updates an integration account. + /// + /// + /// Updates an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes an integration account. + /// + /// + /// Deletes an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets the integration account callback URL. + /// + /// + /// Gets the integration account callback URL. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The callback URL parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, GetCallbackUrlParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets the integration account's Key Vault keys. + /// + /// + /// Gets the integration account's Key Vault keys. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The key vault parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListKeyVaultKeysWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Logs the integration account's tracking events. + /// + /// + /// Logs the integration account's tracking events. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The callback URL parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task LogTrackingEventsWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, TrackingEventsDefinition logTrackingEvents, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Regenerates the integration account access key. + /// + /// + /// Regenerates the integration account access key. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The access key type. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> RegenerateAccessKeyWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, RegenerateActionParameter regenerateAccessKey, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/ILogicManagementClient.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/ILogicManagementClient.cs new file mode 100644 index 000000000000..dda6fd303e35 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/ILogicManagementClient.cs @@ -0,0 +1,182 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// REST API for Azure Logic Apps. + /// + public partial interface ILogicManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + + + /// + /// The API version to use for this operation. + /// + string ApiVersion { get;} + + + /// + /// The subscription id. + /// + string SubscriptionId { get; set;} + + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set;} + + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set;} + + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set;} + + + /// + /// Gets the IWorkflowsOperations + /// + IWorkflowsOperations Workflows { get; } + + /// + /// Gets the IWorkflowVersionsOperations + /// + IWorkflowVersionsOperations WorkflowVersions { get; } + + /// + /// Gets the IWorkflowTriggersOperations + /// + IWorkflowTriggersOperations WorkflowTriggers { get; } + + /// + /// Gets the IWorkflowVersionTriggersOperations + /// + IWorkflowVersionTriggersOperations WorkflowVersionTriggers { get; } + + /// + /// Gets the IWorkflowTriggerHistoriesOperations + /// + IWorkflowTriggerHistoriesOperations WorkflowTriggerHistories { get; } + + /// + /// Gets the IWorkflowRunsOperations + /// + IWorkflowRunsOperations WorkflowRuns { get; } + + /// + /// Gets the IWorkflowRunActionsOperations + /// + IWorkflowRunActionsOperations WorkflowRunActions { get; } + + /// + /// Gets the IWorkflowRunActionRepetitionsOperations + /// + IWorkflowRunActionRepetitionsOperations WorkflowRunActionRepetitions { get; } + + /// + /// Gets the IWorkflowRunActionRepetitionsRequestHistoriesOperations + /// + IWorkflowRunActionRepetitionsRequestHistoriesOperations WorkflowRunActionRepetitionsRequestHistories { get; } + + /// + /// Gets the IWorkflowRunActionRequestHistoriesOperations + /// + IWorkflowRunActionRequestHistoriesOperations WorkflowRunActionRequestHistories { get; } + + /// + /// Gets the IWorkflowRunActionScopeRepetitionsOperations + /// + IWorkflowRunActionScopeRepetitionsOperations WorkflowRunActionScopeRepetitions { get; } + + /// + /// Gets the IWorkflowRunOperations + /// + IWorkflowRunOperations WorkflowRunOperations { get; } + + /// + /// Gets the IIntegrationAccountsOperations + /// + IIntegrationAccountsOperations IntegrationAccounts { get; } + + /// + /// Gets the IIntegrationAccountAssembliesOperations + /// + IIntegrationAccountAssembliesOperations IntegrationAccountAssemblies { get; } + + /// + /// Gets the IIntegrationAccountBatchConfigurationsOperations + /// + IIntegrationAccountBatchConfigurationsOperations IntegrationAccountBatchConfigurations { get; } + + /// + /// Gets the IIntegrationAccountSchemasOperations + /// + IIntegrationAccountSchemasOperations IntegrationAccountSchemas { get; } + + /// + /// Gets the IIntegrationAccountMapsOperations + /// + IIntegrationAccountMapsOperations IntegrationAccountMaps { get; } + + /// + /// Gets the IIntegrationAccountPartnersOperations + /// + IIntegrationAccountPartnersOperations IntegrationAccountPartners { get; } + + /// + /// Gets the IIntegrationAccountAgreementsOperations + /// + IIntegrationAccountAgreementsOperations IntegrationAccountAgreements { get; } + + /// + /// Gets the IIntegrationAccountCertificatesOperations + /// + IIntegrationAccountCertificatesOperations IntegrationAccountCertificates { get; } + + /// + /// Gets the IIntegrationAccountSessionsOperations + /// + IIntegrationAccountSessionsOperations IntegrationAccountSessions { get; } + + /// + /// Gets the IOperations + /// + IOperations Operations { get; } + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IOperations.cs new file mode 100644 index 000000000000..c7e9aa10c399 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IOperations.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsOperations.cs new file mode 100644 index 000000000000..f3d7da87fc9a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsOperations.cs @@ -0,0 +1,119 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRepetitionsOperations operations. + /// + public partial interface IWorkflowRunActionRepetitionsOperations + { + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a workflow run action repetition. + /// + /// + /// Get a workflow run action repetition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Lists a workflow run expression trace. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListExpressionTracesWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsRequestHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsRequestHistoriesOperations.cs new file mode 100644 index 000000000000..d9a3f8dd6f0f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRepetitionsRequestHistoriesOperations.cs @@ -0,0 +1,113 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRepetitionsRequestHistoriesOperations operations. + /// + public partial interface IWorkflowRunActionRepetitionsRequestHistoriesOperations + { + /// + /// List a workflow run repetition request history. + /// + /// + /// List a workflow run repetition request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Gets a workflow run repetition request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The request history name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List a workflow run repetition request history. + /// + /// + /// List a workflow run repetition request history. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRequestHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRequestHistoriesOperations.cs new file mode 100644 index 000000000000..4afd5940f1e4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionRequestHistoriesOperations.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRequestHistoriesOperations operations. + /// + public partial interface IWorkflowRunActionRequestHistoriesOperations + { + /// + /// List a workflow run request history. + /// + /// + /// List a workflow run request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow run request history. + /// + /// + /// Gets a workflow run request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The request history name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string requestHistoryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// List a workflow run request history. + /// + /// + /// List a workflow run request history. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionScopeRepetitionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionScopeRepetitionsOperations.cs new file mode 100644 index 000000000000..c4c7249d617a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionScopeRepetitionsOperations.cs @@ -0,0 +1,84 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionScopeRepetitionsOperations operations. + /// + public partial interface IWorkflowRunActionScopeRepetitionsOperations + { + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionsOperations.cs new file mode 100644 index 000000000000..c1f55236e648 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunActionsOperations.cs @@ -0,0 +1,136 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionsOperations operations. + /// + public partial interface IWorkflowRunActionsOperations + { + /// + /// Gets a list of workflow run actions. + /// + /// + /// Gets a list of workflow run actions. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow run action. + /// + /// + /// Gets a workflow run action. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Lists a workflow run expression trace. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListExpressionTracesWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflow run actions. + /// + /// + /// Gets a list of workflow run actions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunOperations.cs new file mode 100644 index 000000000000..5910dd8fb153 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunOperations.cs @@ -0,0 +1,49 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunOperations operations. + /// + public partial interface IWorkflowRunOperations + { + /// + /// Gets an operation for a run. + /// + /// + /// Gets an operation for a run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow operation id. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunsOperations.cs new file mode 100644 index 000000000000..fb4a55838940 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowRunsOperations.cs @@ -0,0 +1,150 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunsOperations operations. + /// + public partial interface IWorkflowRunsOperations + { + /// + /// Gets a list of workflow runs. + /// + /// + /// Gets a list of workflow runs. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow run. + /// + /// + /// Gets a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes a workflow run. + /// + /// + /// Deletes a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Cancels a workflow run. + /// + /// + /// Cancels a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task CancelWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflow runs. + /// + /// + /// Gets a list of workflow runs. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggerHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggerHistoriesOperations.cs new file mode 100644 index 000000000000..eaa388214369 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggerHistoriesOperations.cs @@ -0,0 +1,135 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowTriggerHistoriesOperations operations. + /// + public partial interface IWorkflowTriggerHistoriesOperations + { + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow trigger history. + /// + /// + /// Gets a workflow trigger history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, string historyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task ResubmitWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, string historyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggersOperations.cs new file mode 100644 index 000000000000..5327db6e9409 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowTriggersOperations.cs @@ -0,0 +1,237 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowTriggersOperations operations. + /// + public partial interface IWorkflowTriggersOperations + { + /// + /// Gets a list of workflow triggers. + /// + /// + /// Gets a list of workflow triggers. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow trigger. + /// + /// + /// Gets a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Resets a workflow trigger. + /// + /// + /// Resets a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task ResetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Runs a workflow trigger. + /// + /// + /// Runs a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task RunWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the trigger schema as JSON. + /// + /// + /// Get the trigger schema as JSON. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetSchemaJsonWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Sets the state of a workflow trigger. + /// + /// + /// Sets the state of a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger state. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task SetStateWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, SetTriggerStateActionDefinition setState, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflow triggers. + /// + /// + /// Gets a list of workflow triggers. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionTriggersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionTriggersOperations.cs new file mode 100644 index 000000000000..57cdac836489 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionTriggersOperations.cs @@ -0,0 +1,52 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowVersionTriggersOperations operations. + /// + public partial interface IWorkflowVersionTriggersOperations + { + /// + /// Get the callback url for a trigger of a workflow version. + /// + /// + /// Get the callback url for a trigger of a workflow version. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The workflow trigger name. + /// + /// + /// The callback URL parameters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, string versionId, string triggerName, GetCallbackUrlParameters parameters = default(GetCallbackUrlParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionsOperations.cs new file mode 100644 index 000000000000..36b16eabd669 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowVersionsOperations.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowVersionsOperations operations. + /// + public partial interface IWorkflowVersionsOperations + { + /// + /// Gets a list of workflow versions. + /// + /// + /// Gets a list of workflow versions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow version. + /// + /// + /// Gets a workflow version. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string versionId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflow versions. + /// + /// + /// Gets a list of workflow versions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowsOperations.cs new file mode 100644 index 000000000000..a31d811dba01 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IWorkflowsOperations.cs @@ -0,0 +1,456 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowsOperations operations. + /// + public partial interface IWorkflowsOperations + { + /// + /// Gets a list of workflows by subscription. + /// + /// + /// Gets a list of workflows by subscription. + /// + /// + /// + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflows by resource group. + /// + /// + /// Gets a list of workflows by resource group. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a workflow. + /// + /// + /// Gets a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Creates or updates a workflow. + /// + /// + /// Creates or updates a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Updates a workflow. + /// + /// + /// Updates a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Deletes a workflow. + /// + /// + /// Deletes a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Disables a workflow. + /// + /// + /// Disables a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task DisableWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Enables a workflow. + /// + /// + /// Enables a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task EnableWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Generates the upgraded definition for a workflow. + /// + /// + /// Generates the upgraded definition for a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Parameters for generating an upgraded definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> GenerateUpgradedDefinitionWithHttpMessagesAsync(string resourceGroupName, string workflowName, GenerateUpgradedDefinitionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get the workflow callback Url. + /// + /// + /// Get the workflow callback Url. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Which callback url to list. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets an OpenAPI definition for the workflow. + /// + /// + /// Gets an OpenAPI definition for the workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> ListSwaggerWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Moves an existing workflow. + /// + /// + /// Moves an existing workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow to move. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task MoveWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow move, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The access key type. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task RegenerateAccessKeyWithHttpMessagesAsync(string resourceGroupName, string workflowName, RegenerateActionParameter keyType, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Validates the workflow. + /// + /// + /// Validates the workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task ValidateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow validate, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Validates the workflow definition. + /// + /// + /// Validates the workflow definition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow location. + /// + /// + /// The workflow name. + /// + /// + /// The workflow definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task ValidateByLocationWithHttpMessagesAsync(string resourceGroupName, string location, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflows by subscription. + /// + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Gets a list of workflows by resource group. + /// + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperations.cs new file mode 100644 index 000000000000..033d77ed3074 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperations.cs @@ -0,0 +1,1372 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountAgreementsOperations operations. + /// + internal partial class IntegrationAccountAgreementsOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountAgreementsOperations + { + /// + /// Initializes a new instance of the IntegrationAccountAgreementsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountAgreementsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account agreements. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _integrationAccountAgreementFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_integrationAccountAgreementFilter)) + { + _queryParameters.Add(_integrationAccountAgreementFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (agreementName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agreementName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("agreementName", agreementName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{agreementName}", System.Uri.EscapeDataString(agreementName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The integration account agreement. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, IntegrationAccountAgreement agreement, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (agreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agreement"); + } + if (agreement != null) + { + agreement.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (agreementName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agreementName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("agreementName", agreementName); + + tracingParameters.Add("agreement", agreement); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{agreementName}", System.Uri.EscapeDataString(agreementName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(agreement != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(agreement, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account agreement. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (agreementName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agreementName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("agreementName", agreementName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{agreementName}", System.Uri.EscapeDataString(agreementName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string agreementName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listContentCallbackUrl == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listContentCallbackUrl"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (agreementName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agreementName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("agreementName", agreementName); + + tracingParameters.Add("listContentCallbackUrl", listContentCallbackUrl); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListContentCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{agreementName}", System.Uri.EscapeDataString(agreementName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listContentCallbackUrl != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listContentCallbackUrl, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account agreements. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperationsExtensions.cs new file mode 100644 index 000000000000..54bab84c04df --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAgreementsOperationsExtensions.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountAgreementsOperations + /// + public static partial class IntegrationAccountAgreementsOperationsExtensions + { + /// + /// Gets a list of integration account agreements. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IIntegrationAccountAgreementsOperations)operations).ListAsync(resourceGroupName, integrationAccountName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account agreements. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + public static IntegrationAccountAgreement Get(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName) + { + return ((IIntegrationAccountAgreementsOperations)operations).GetAsync(resourceGroupName, integrationAccountName, agreementName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + public static IntegrationAccountAgreement CreateOrUpdate(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, IntegrationAccountAgreement agreement) + { + return ((IIntegrationAccountAgreementsOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, agreementName, agreement).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, IntegrationAccountAgreement agreement, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, agreement, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + public static void Delete(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName) + { + ((IIntegrationAccountAgreementsOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, agreementName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account agreement. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + public static WorkflowTriggerCallbackUrl ListContentCallbackUrl(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, GetCallbackUrlParameters listContentCallbackUrl) + { + return ((IIntegrationAccountAgreementsOperations)operations).ListContentCallbackUrlAsync(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrl).GetAwaiter().GetResult(); + } + + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account agreement name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListContentCallbackUrlAsync(this IIntegrationAccountAgreementsOperations operations, string resourceGroupName, string integrationAccountName, string agreementName, GetCallbackUrlParameters listContentCallbackUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListContentCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, agreementName, listContentCallbackUrl, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration account agreements. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountAgreementsOperations operations, string nextPageLink) + { + return ((IIntegrationAccountAgreementsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account agreements. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountAgreementsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperations.cs new file mode 100644 index 000000000000..5a66182c94e0 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperations.cs @@ -0,0 +1,1162 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountAssembliesOperations operations. + /// + internal partial class IntegrationAccountAssembliesOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountAssembliesOperations + { + /// + /// Initializes a new instance of the IntegrationAccountAssembliesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountAssembliesOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// List the assemblies for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (assemblyArtifactName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "assemblyArtifactName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("assemblyArtifactName", assemblyArtifactName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{assemblyArtifactName}", System.Uri.EscapeDataString(assemblyArtifactName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Create or update an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The assembly artifact. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, AssemblyDefinition assemblyArtifact, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (assemblyArtifact == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "assemblyArtifact"); + } + if (assemblyArtifact != null) + { + assemblyArtifact.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (assemblyArtifactName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "assemblyArtifactName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("assemblyArtifactName", assemblyArtifactName); + + tracingParameters.Add("assemblyArtifact", assemblyArtifact); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{assemblyArtifactName}", System.Uri.EscapeDataString(assemblyArtifactName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(assemblyArtifact != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(assemblyArtifact, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Delete an assembly for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (assemblyArtifactName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "assemblyArtifactName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("assemblyArtifactName", assemblyArtifactName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{assemblyArtifactName}", System.Uri.EscapeDataString(assemblyArtifactName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the content callback url for an integration account assembly. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (assemblyArtifactName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "assemblyArtifactName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("assemblyArtifactName", assemblyArtifactName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListContentCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{assemblyArtifactName}", System.Uri.EscapeDataString(assemblyArtifactName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperationsExtensions.cs new file mode 100644 index 000000000000..30f7aa330caf --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountAssembliesOperationsExtensions.cs @@ -0,0 +1,232 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountAssembliesOperations + /// + public static partial class IntegrationAccountAssembliesOperationsExtensions + { + /// + /// List the assemblies for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static System.Collections.Generic.IEnumerable List(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName) + { + return ((IIntegrationAccountAssembliesOperations)operations).ListAsync(resourceGroupName, integrationAccountName).GetAwaiter().GetResult(); + } + + /// + /// List the assemblies for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + public static AssemblyDefinition Get(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName) + { + return ((IIntegrationAccountAssembliesOperations)operations).GetAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).GetAwaiter().GetResult(); + } + + /// + /// Get an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Create or update an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + public static AssemblyDefinition CreateOrUpdate(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName, AssemblyDefinition assemblyArtifact) + { + return ((IIntegrationAccountAssembliesOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact).GetAwaiter().GetResult(); + } + + /// + /// Create or update an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName, AssemblyDefinition assemblyArtifact, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, assemblyArtifact, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + public static void Delete(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName) + { + ((IIntegrationAccountAssembliesOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).GetAwaiter().GetResult(); + } + + /// + /// Delete an assembly for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the content callback url for an integration account assembly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + public static WorkflowTriggerCallbackUrl ListContentCallbackUrl(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName) + { + return ((IIntegrationAccountAssembliesOperations)operations).ListContentCallbackUrlAsync(resourceGroupName, integrationAccountName, assemblyArtifactName).GetAwaiter().GetResult(); + } + + /// + /// Get the content callback url for an integration account assembly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The assembly artifact name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListContentCallbackUrlAsync(this IIntegrationAccountAssembliesOperations operations, string resourceGroupName, string integrationAccountName, string assemblyArtifactName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListContentCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, assemblyArtifactName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperations.cs new file mode 100644 index 000000000000..49bbdde229ca --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperations.cs @@ -0,0 +1,939 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountBatchConfigurationsOperations operations. + /// + internal partial class IntegrationAccountBatchConfigurationsOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountBatchConfigurationsOperations + { + /// + /// Initializes a new instance of the IntegrationAccountBatchConfigurationsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountBatchConfigurationsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// List the batch configurations for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (batchConfigurationName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "batchConfigurationName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("batchConfigurationName", batchConfigurationName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{batchConfigurationName}", System.Uri.EscapeDataString(batchConfigurationName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Create or update a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The batch configuration. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, BatchConfiguration batchConfiguration, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (batchConfiguration == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "batchConfiguration"); + } + if (batchConfiguration != null) + { + batchConfiguration.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (batchConfigurationName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "batchConfigurationName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("batchConfigurationName", batchConfigurationName); + + tracingParameters.Add("batchConfiguration", batchConfiguration); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{batchConfigurationName}", System.Uri.EscapeDataString(batchConfigurationName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(batchConfiguration != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(batchConfiguration, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Delete a batch configuration for an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (batchConfigurationName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "batchConfigurationName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("batchConfigurationName", batchConfigurationName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{batchConfigurationName}", System.Uri.EscapeDataString(batchConfigurationName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperationsExtensions.cs new file mode 100644 index 000000000000..32ae6102ddf3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountBatchConfigurationsOperationsExtensions.cs @@ -0,0 +1,187 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountBatchConfigurationsOperations + /// + public static partial class IntegrationAccountBatchConfigurationsOperationsExtensions + { + /// + /// List the batch configurations for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static System.Collections.Generic.IEnumerable List(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName) + { + return ((IIntegrationAccountBatchConfigurationsOperations)operations).ListAsync(resourceGroupName, integrationAccountName).GetAwaiter().GetResult(); + } + + /// + /// List the batch configurations for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + public static BatchConfiguration Get(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName) + { + return ((IIntegrationAccountBatchConfigurationsOperations)operations).GetAsync(resourceGroupName, integrationAccountName, batchConfigurationName).GetAwaiter().GetResult(); + } + + /// + /// Get a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, batchConfigurationName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Create or update a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + public static BatchConfiguration CreateOrUpdate(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName, BatchConfiguration batchConfiguration) + { + return ((IIntegrationAccountBatchConfigurationsOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration).GetAwaiter().GetResult(); + } + + /// + /// Create or update a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName, BatchConfiguration batchConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Delete a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + public static void Delete(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName) + { + ((IIntegrationAccountBatchConfigurationsOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, batchConfigurationName).GetAwaiter().GetResult(); + } + + /// + /// Delete a batch configuration for an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The batch configuration name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountBatchConfigurationsOperations operations, string resourceGroupName, string integrationAccountName, string batchConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, batchConfigurationName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperations.cs new file mode 100644 index 000000000000..829b06e3bc59 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperations.cs @@ -0,0 +1,1130 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountCertificatesOperations operations. + /// + internal partial class IntegrationAccountCertificatesOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountCertificatesOperations + { + /// + /// Initializes a new instance of the IntegrationAccountCertificatesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountCertificatesOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account certificates. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("top", top); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (certificateName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "certificateName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("certificateName", certificateName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The integration account certificate. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, IntegrationAccountCertificate certificate, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (certificate == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "certificate"); + } + if (certificate != null) + { + certificate.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (certificateName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "certificateName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("certificateName", certificateName); + + tracingParameters.Add("certificate", certificate); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(certificate != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(certificate, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account certificate. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string certificateName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (certificateName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "certificateName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("certificateName", certificateName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account certificates. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperationsExtensions.cs new file mode 100644 index 000000000000..854f2c65aea8 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountCertificatesOperationsExtensions.cs @@ -0,0 +1,226 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountCertificatesOperations + /// + public static partial class IntegrationAccountCertificatesOperationsExtensions + { + /// + /// Gets a list of integration account certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The number of items to be included in the result. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, int? top = default(int?)) + { + return ((IIntegrationAccountCertificatesOperations)operations).ListAsync(resourceGroupName, integrationAccountName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + public static IntegrationAccountCertificate Get(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName) + { + return ((IIntegrationAccountCertificatesOperations)operations).GetAsync(resourceGroupName, integrationAccountName, certificateName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, certificateName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + public static IntegrationAccountCertificate CreateOrUpdate(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName, IntegrationAccountCertificate certificate) + { + return ((IIntegrationAccountCertificatesOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, certificateName, certificate).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName, IntegrationAccountCertificate certificate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, certificateName, certificate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + public static void Delete(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName) + { + ((IIntegrationAccountCertificatesOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, certificateName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account certificate. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account certificate name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountCertificatesOperations operations, string resourceGroupName, string integrationAccountName, string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, certificateName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of integration account certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountCertificatesOperations operations, string nextPageLink) + { + return ((IIntegrationAccountCertificatesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountCertificatesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperations.cs new file mode 100644 index 000000000000..08ab2ac582d9 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperations.cs @@ -0,0 +1,1372 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountMapsOperations operations. + /// + internal partial class IntegrationAccountMapsOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountMapsOperations + { + /// + /// Initializes a new instance of the IntegrationAccountMapsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountMapsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account maps. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _integrationAccountMapFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_integrationAccountMapFilter)) + { + _queryParameters.Add(_integrationAccountMapFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (mapName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mapName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("mapName", mapName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{mapName}", System.Uri.EscapeDataString(mapName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The integration account map. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, IntegrationAccountMap map, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (map == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "map"); + } + if (map != null) + { + map.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (mapName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mapName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("mapName", mapName); + + tracingParameters.Add("map", map); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{mapName}", System.Uri.EscapeDataString(mapName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(map != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(map, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account map. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (mapName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mapName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("mapName", mapName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{mapName}", System.Uri.EscapeDataString(mapName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string mapName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listContentCallbackUrl == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listContentCallbackUrl"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (mapName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "mapName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("mapName", mapName); + + tracingParameters.Add("listContentCallbackUrl", listContentCallbackUrl); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListContentCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{mapName}", System.Uri.EscapeDataString(mapName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listContentCallbackUrl != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listContentCallbackUrl, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account maps. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperationsExtensions.cs new file mode 100644 index 000000000000..59b8516a8e27 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountMapsOperationsExtensions.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountMapsOperations + /// + public static partial class IntegrationAccountMapsOperationsExtensions + { + /// + /// Gets a list of integration account maps. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IIntegrationAccountMapsOperations)operations).ListAsync(resourceGroupName, integrationAccountName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account maps. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + public static IntegrationAccountMap Get(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName) + { + return ((IIntegrationAccountMapsOperations)operations).GetAsync(resourceGroupName, integrationAccountName, mapName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, mapName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + public static IntegrationAccountMap CreateOrUpdate(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, IntegrationAccountMap map) + { + return ((IIntegrationAccountMapsOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, mapName, map).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, IntegrationAccountMap map, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, mapName, map, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + public static void Delete(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName) + { + ((IIntegrationAccountMapsOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, mapName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account map. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, mapName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + public static WorkflowTriggerCallbackUrl ListContentCallbackUrl(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, GetCallbackUrlParameters listContentCallbackUrl) + { + return ((IIntegrationAccountMapsOperations)operations).ListContentCallbackUrlAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrl).GetAwaiter().GetResult(); + } + + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account map name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListContentCallbackUrlAsync(this IIntegrationAccountMapsOperations operations, string resourceGroupName, string integrationAccountName, string mapName, GetCallbackUrlParameters listContentCallbackUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListContentCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, mapName, listContentCallbackUrl, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration account maps. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountMapsOperations operations, string nextPageLink) + { + return ((IIntegrationAccountMapsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account maps. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountMapsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperations.cs new file mode 100644 index 000000000000..c73e7b0b07de --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperations.cs @@ -0,0 +1,1372 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountPartnersOperations operations. + /// + internal partial class IntegrationAccountPartnersOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountPartnersOperations + { + /// + /// Initializes a new instance of the IntegrationAccountPartnersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountPartnersOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account partners. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _integrationAccountPartnerFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_integrationAccountPartnerFilter)) + { + _queryParameters.Add(_integrationAccountPartnerFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (partnerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "partnerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("partnerName", partnerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{partnerName}", System.Uri.EscapeDataString(partnerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The integration account partner. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, IntegrationAccountPartner partner, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (partner == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "partner"); + } + if (partner != null) + { + partner.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (partnerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "partnerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("partnerName", partnerName); + + tracingParameters.Add("partner", partner); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{partnerName}", System.Uri.EscapeDataString(partnerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(partner != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(partner, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account partner. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (partnerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "partnerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("partnerName", partnerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{partnerName}", System.Uri.EscapeDataString(partnerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string partnerName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listContentCallbackUrl == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listContentCallbackUrl"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (partnerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "partnerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("partnerName", partnerName); + + tracingParameters.Add("listContentCallbackUrl", listContentCallbackUrl); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListContentCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{partnerName}", System.Uri.EscapeDataString(partnerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listContentCallbackUrl != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listContentCallbackUrl, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account partners. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperationsExtensions.cs new file mode 100644 index 000000000000..1faef62dcdbc --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountPartnersOperationsExtensions.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountPartnersOperations + /// + public static partial class IntegrationAccountPartnersOperationsExtensions + { + /// + /// Gets a list of integration account partners. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IIntegrationAccountPartnersOperations)operations).ListAsync(resourceGroupName, integrationAccountName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account partners. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + public static IntegrationAccountPartner Get(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName) + { + return ((IIntegrationAccountPartnersOperations)operations).GetAsync(resourceGroupName, integrationAccountName, partnerName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + public static IntegrationAccountPartner CreateOrUpdate(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, IntegrationAccountPartner partner) + { + return ((IIntegrationAccountPartnersOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, partnerName, partner).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, IntegrationAccountPartner partner, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, partner, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + public static void Delete(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName) + { + ((IIntegrationAccountPartnersOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, partnerName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account partner. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + public static WorkflowTriggerCallbackUrl ListContentCallbackUrl(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, GetCallbackUrlParameters listContentCallbackUrl) + { + return ((IIntegrationAccountPartnersOperations)operations).ListContentCallbackUrlAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl).GetAwaiter().GetResult(); + } + + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account partner name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListContentCallbackUrlAsync(this IIntegrationAccountPartnersOperations operations, string resourceGroupName, string integrationAccountName, string partnerName, GetCallbackUrlParameters listContentCallbackUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListContentCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, partnerName, listContentCallbackUrl, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration account partners. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountPartnersOperations operations, string nextPageLink) + { + return ((IIntegrationAccountPartnersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account partners. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountPartnersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperations.cs new file mode 100644 index 000000000000..d53244c480df --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperations.cs @@ -0,0 +1,1372 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountSchemasOperations operations. + /// + internal partial class IntegrationAccountSchemasOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountSchemasOperations + { + /// + /// Initializes a new instance of the IntegrationAccountSchemasOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountSchemasOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account schemas. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _integrationAccountSchemaFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_integrationAccountSchemaFilter)) + { + _queryParameters.Add(_integrationAccountSchemaFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (schemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "schemaName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("schemaName", schemaName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The integration account schema. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, IntegrationAccountSchema schema, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (schema == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "schema"); + } + if (schema != null) + { + schema.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (schemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "schemaName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("schemaName", schemaName); + + tracingParameters.Add("schema", schema); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(schema != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(schema, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account schema. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (schemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "schemaName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("schemaName", schemaName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the content callback url. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListContentCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string schemaName, GetCallbackUrlParameters listContentCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listContentCallbackUrl == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listContentCallbackUrl"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (schemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "schemaName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("schemaName", schemaName); + + tracingParameters.Add("listContentCallbackUrl", listContentCallbackUrl); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListContentCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{schemaName}", System.Uri.EscapeDataString(schemaName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listContentCallbackUrl != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listContentCallbackUrl, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account schemas. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperationsExtensions.cs new file mode 100644 index 000000000000..a339e0990d53 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSchemasOperationsExtensions.cs @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountSchemasOperations + /// + public static partial class IntegrationAccountSchemasOperationsExtensions + { + /// + /// Gets a list of integration account schemas. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IIntegrationAccountSchemasOperations)operations).ListAsync(resourceGroupName, integrationAccountName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account schemas. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + public static IntegrationAccountSchema Get(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName) + { + return ((IIntegrationAccountSchemasOperations)operations).GetAsync(resourceGroupName, integrationAccountName, schemaName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, schemaName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + public static IntegrationAccountSchema CreateOrUpdate(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, IntegrationAccountSchema schema) + { + return ((IIntegrationAccountSchemasOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, schemaName, schema).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, IntegrationAccountSchema schema, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, schemaName, schema, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + public static void Delete(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName) + { + ((IIntegrationAccountSchemasOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, schemaName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account schema. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, schemaName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + public static WorkflowTriggerCallbackUrl ListContentCallbackUrl(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, GetCallbackUrlParameters listContentCallbackUrl) + { + return ((IIntegrationAccountSchemasOperations)operations).ListContentCallbackUrlAsync(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrl).GetAwaiter().GetResult(); + } + + /// + /// Get the content callback url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account schema name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListContentCallbackUrlAsync(this IIntegrationAccountSchemasOperations operations, string resourceGroupName, string integrationAccountName, string schemaName, GetCallbackUrlParameters listContentCallbackUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListContentCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, schemaName, listContentCallbackUrl, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration account schemas. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountSchemasOperations operations, string nextPageLink) + { + return ((IIntegrationAccountSchemasOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account schemas. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountSchemasOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperations.cs new file mode 100644 index 000000000000..26c1a533e878 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperations.cs @@ -0,0 +1,1131 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountSessionsOperations operations. + /// + internal partial class IntegrationAccountSessionsOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountSessionsOperations + { + /// + /// Initializes a new instance of the IntegrationAccountSessionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountSessionsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration account sessions. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _integrationAccountSessionFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_integrationAccountSessionFilter)) + { + _queryParameters.Add(_integrationAccountSessionFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (sessionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sessionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("sessionName", sessionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{sessionName}", System.Uri.EscapeDataString(sessionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The integration account session. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, IntegrationAccountSession session, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (session == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "session"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (sessionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sessionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("sessionName", sessionName); + + tracingParameters.Add("session", session); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{sessionName}", System.Uri.EscapeDataString(sessionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(session != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(session, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account session. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, string sessionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (sessionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sessionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + tracingParameters.Add("sessionName", sessionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + _url = _url.Replace("{sessionName}", System.Uri.EscapeDataString(sessionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration account sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperationsExtensions.cs new file mode 100644 index 000000000000..86d417857efd --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountSessionsOperationsExtensions.cs @@ -0,0 +1,226 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountSessionsOperations + /// + public static partial class IntegrationAccountSessionsOperationsExtensions + { + /// + /// Gets a list of integration account sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static Microsoft.Rest.Azure.IPage List(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IIntegrationAccountSessionsOperations)operations).ListAsync(resourceGroupName, integrationAccountName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, integrationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + public static IntegrationAccountSession Get(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName) + { + return ((IIntegrationAccountSessionsOperations)operations).GetAsync(resourceGroupName, integrationAccountName, sessionName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, sessionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + public static IntegrationAccountSession CreateOrUpdate(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName, IntegrationAccountSession session) + { + return ((IIntegrationAccountSessionsOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, sessionName, session).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName, IntegrationAccountSession session, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, sessionName, session, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + public static void Delete(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName) + { + ((IIntegrationAccountSessionsOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName, sessionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account session name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountSessionsOperations operations, string resourceGroupName, string integrationAccountName, string sessionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, sessionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of integration account sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IIntegrationAccountSessionsOperations operations, string nextPageLink) + { + return ((IIntegrationAccountSessionsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration account sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IIntegrationAccountSessionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperations.cs new file mode 100644 index 000000000000..4dd088c6720e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperations.cs @@ -0,0 +1,2598 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// IntegrationAccountsOperations operations. + /// + internal partial class IntegrationAccountsOperations : Microsoft.Rest.IServiceOperations, IIntegrationAccountsOperations + { + /// + /// Initializes a new instance of the IntegrationAccountsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationAccountsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("top", top); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The resource group name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("top", top); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (integrationAccount == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccount"); + } + if (integrationAccount != null) + { + integrationAccount.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("integrationAccount", integrationAccount); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(integrationAccount != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(integrationAccount, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Updates an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The integration account. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (integrationAccount == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccount"); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("integrationAccount", integrationAccount); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(integrationAccount != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(integrationAccount, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes an integration account. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets the integration account callback URL. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The callback URL parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, GetCallbackUrlParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("parameters", parameters); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets the integration account's Key Vault keys. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The key vault parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListKeyVaultKeysWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listKeyVaultKeys == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listKeyVaultKeys"); + } + if (listKeyVaultKeys != null) + { + listKeyVaultKeys.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("listKeyVaultKeys", listKeyVaultKeys); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListKeyVaultKeys", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listKeyVaultKeys != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listKeyVaultKeys, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Logs the integration account's tracking events. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The callback URL parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task LogTrackingEventsWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, TrackingEventsDefinition logTrackingEvents, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (logTrackingEvents == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "logTrackingEvents"); + } + if (logTrackingEvents != null) + { + logTrackingEvents.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("logTrackingEvents", logTrackingEvents); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "LogTrackingEvents", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(logTrackingEvents != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(logTrackingEvents, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Regenerates the integration account access key. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The access key type. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> RegenerateAccessKeyWithHttpMessagesAsync(string resourceGroupName, string integrationAccountName, RegenerateActionParameter regenerateAccessKey, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (regenerateAccessKey == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "regenerateAccessKey"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (integrationAccountName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "integrationAccountName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("integrationAccountName", integrationAccountName); + + tracingParameters.Add("regenerateAccessKey", regenerateAccessKey); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "RegenerateAccessKey", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{integrationAccountName}", System.Uri.EscapeDataString(integrationAccountName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(regenerateAccessKey != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(regenerateAccessKey, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperationsExtensions.cs new file mode 100644 index 000000000000..52a9d6f6d796 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/IntegrationAccountsOperationsExtensions.cs @@ -0,0 +1,460 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for IntegrationAccountsOperations + /// + public static partial class IntegrationAccountsOperationsExtensions + { + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The number of items to be included in the result. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscription(this IIntegrationAccountsOperations operations, int? top = default(int?)) + { + return ((IIntegrationAccountsOperations)operations).ListBySubscriptionAsync(top).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this IIntegrationAccountsOperations operations, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The number of items to be included in the result. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IIntegrationAccountsOperations operations, string resourceGroupName, int? top = default(int?)) + { + return ((IIntegrationAccountsOperations)operations).ListByResourceGroupAsync(resourceGroupName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static IntegrationAccount Get(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName) + { + return ((IIntegrationAccountsOperations)operations).GetAsync(resourceGroupName, integrationAccountName).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, integrationAccountName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static IntegrationAccount CreateOrUpdate(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount) + { + return ((IIntegrationAccountsOperations)operations).CreateOrUpdateAsync(resourceGroupName, integrationAccountName, integrationAccount).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, integrationAccount, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static IntegrationAccount Update(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount) + { + return ((IIntegrationAccountsOperations)operations).UpdateAsync(resourceGroupName, integrationAccountName, integrationAccount).GetAwaiter().GetResult(); + } + + /// + /// Updates an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, IntegrationAccount integrationAccount, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, integrationAccountName, integrationAccount, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static void Delete(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName) + { + ((IIntegrationAccountsOperations)operations).DeleteAsync(resourceGroupName, integrationAccountName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration account. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, integrationAccountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets the integration account callback URL. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static CallbackUrl ListCallbackUrl(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, GetCallbackUrlParameters parameters) + { + return ((IIntegrationAccountsOperations)operations).ListCallbackUrlAsync(resourceGroupName, integrationAccountName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Gets the integration account callback URL. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListCallbackUrlAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, GetCallbackUrlParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListCallbackUrlWithHttpMessagesAsync(resourceGroupName, integrationAccountName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the integration account's Key Vault keys. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static System.Collections.Generic.IEnumerable ListKeyVaultKeys(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys) + { + return ((IIntegrationAccountsOperations)operations).ListKeyVaultKeysAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys).GetAwaiter().GetResult(); + } + + /// + /// Gets the integration account's Key Vault keys. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListKeyVaultKeysAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, ListKeyVaultKeysDefinition listKeyVaultKeys, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListKeyVaultKeysWithHttpMessagesAsync(resourceGroupName, integrationAccountName, listKeyVaultKeys, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Logs the integration account's tracking events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static void LogTrackingEvents(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, TrackingEventsDefinition logTrackingEvents) + { + ((IIntegrationAccountsOperations)operations).LogTrackingEventsAsync(resourceGroupName, integrationAccountName, logTrackingEvents).GetAwaiter().GetResult(); + } + + /// + /// Logs the integration account's tracking events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task LogTrackingEventsAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, TrackingEventsDefinition logTrackingEvents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.LogTrackingEventsWithHttpMessagesAsync(resourceGroupName, integrationAccountName, logTrackingEvents, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Regenerates the integration account access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + public static IntegrationAccount RegenerateAccessKey(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, RegenerateActionParameter regenerateAccessKey) + { + return ((IIntegrationAccountsOperations)operations).RegenerateAccessKeyAsync(resourceGroupName, integrationAccountName, regenerateAccessKey).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the integration account access key. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The integration account name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegenerateAccessKeyAsync(this IIntegrationAccountsOperations operations, string resourceGroupName, string integrationAccountName, RegenerateActionParameter regenerateAccessKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RegenerateAccessKeyWithHttpMessagesAsync(resourceGroupName, integrationAccountName, regenerateAccessKey, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this IIntegrationAccountsOperations operations, string nextPageLink) + { + return ((IIntegrationAccountsOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration accounts by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionNextAsync(this IIntegrationAccountsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IIntegrationAccountsOperations operations, string nextPageLink) + { + return ((IIntegrationAccountsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of integration accounts by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IIntegrationAccountsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/LogicManagementClient.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/LogicManagementClient.cs new file mode 100644 index 000000000000..62933fe2237f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/LogicManagementClient.cs @@ -0,0 +1,444 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// REST API for Azure Logic Apps. + /// + public partial class LogicManagementClient : Microsoft.Rest.ServiceClient, ILogicManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + /// + /// Gets or sets json serialization settings. + /// + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } + /// + /// Gets or sets json deserialization settings. + /// + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } + /// + /// Credentials needed for the client to connect to Azure. + /// + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } + + /// + /// The API version to use for this operation. + /// + public string ApiVersion { get; private set; } + + /// + /// The subscription id. + /// + public string SubscriptionId { get; set;} + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set;} + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// /// value is 30. + /// + public int? LongRunningOperationRetryTimeout { get; set;} + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// /// set to true a unique x-ms-client-request-id value is generated and + /// /// included in each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set;} + + /// + /// Gets the IWorkflowsOperations + /// + public virtual IWorkflowsOperations Workflows { get; private set; } + /// + /// Gets the IWorkflowVersionsOperations + /// + public virtual IWorkflowVersionsOperations WorkflowVersions { get; private set; } + /// + /// Gets the IWorkflowTriggersOperations + /// + public virtual IWorkflowTriggersOperations WorkflowTriggers { get; private set; } + /// + /// Gets the IWorkflowVersionTriggersOperations + /// + public virtual IWorkflowVersionTriggersOperations WorkflowVersionTriggers { get; private set; } + /// + /// Gets the IWorkflowTriggerHistoriesOperations + /// + public virtual IWorkflowTriggerHistoriesOperations WorkflowTriggerHistories { get; private set; } + /// + /// Gets the IWorkflowRunsOperations + /// + public virtual IWorkflowRunsOperations WorkflowRuns { get; private set; } + /// + /// Gets the IWorkflowRunActionsOperations + /// + public virtual IWorkflowRunActionsOperations WorkflowRunActions { get; private set; } + /// + /// Gets the IWorkflowRunActionRepetitionsOperations + /// + public virtual IWorkflowRunActionRepetitionsOperations WorkflowRunActionRepetitions { get; private set; } + /// + /// Gets the IWorkflowRunActionRepetitionsRequestHistoriesOperations + /// + public virtual IWorkflowRunActionRepetitionsRequestHistoriesOperations WorkflowRunActionRepetitionsRequestHistories { get; private set; } + /// + /// Gets the IWorkflowRunActionRequestHistoriesOperations + /// + public virtual IWorkflowRunActionRequestHistoriesOperations WorkflowRunActionRequestHistories { get; private set; } + /// + /// Gets the IWorkflowRunActionScopeRepetitionsOperations + /// + public virtual IWorkflowRunActionScopeRepetitionsOperations WorkflowRunActionScopeRepetitions { get; private set; } + /// + /// Gets the IWorkflowRunOperations + /// + public virtual IWorkflowRunOperations WorkflowRunOperations { get; private set; } + /// + /// Gets the IIntegrationAccountsOperations + /// + public virtual IIntegrationAccountsOperations IntegrationAccounts { get; private set; } + /// + /// Gets the IIntegrationAccountAssembliesOperations + /// + public virtual IIntegrationAccountAssembliesOperations IntegrationAccountAssemblies { get; private set; } + /// + /// Gets the IIntegrationAccountBatchConfigurationsOperations + /// + public virtual IIntegrationAccountBatchConfigurationsOperations IntegrationAccountBatchConfigurations { get; private set; } + /// + /// Gets the IIntegrationAccountSchemasOperations + /// + public virtual IIntegrationAccountSchemasOperations IntegrationAccountSchemas { get; private set; } + /// + /// Gets the IIntegrationAccountMapsOperations + /// + public virtual IIntegrationAccountMapsOperations IntegrationAccountMaps { get; private set; } + /// + /// Gets the IIntegrationAccountPartnersOperations + /// + public virtual IIntegrationAccountPartnersOperations IntegrationAccountPartners { get; private set; } + /// + /// Gets the IIntegrationAccountAgreementsOperations + /// + public virtual IIntegrationAccountAgreementsOperations IntegrationAccountAgreements { get; private set; } + /// + /// Gets the IIntegrationAccountCertificatesOperations + /// + public virtual IIntegrationAccountCertificatesOperations IntegrationAccountCertificates { get; private set; } + /// + /// Gets the IIntegrationAccountSessionsOperations + /// + public virtual IIntegrationAccountSessionsOperations IntegrationAccountSessions { get; private set; } + /// + /// Gets the IOperations + /// + public virtual IOperations Operations { get; private set; } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling LogicManagementClient.Dispose(). False: will not dispose provided httpClient + protected LogicManagementClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + this.Initialize(); + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected LogicManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) + { + this.Initialize(); + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected LogicManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + this.Initialize(); + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected LogicManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + this.BaseUri = baseUri; + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected LogicManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + + this.BaseUri = baseUri; + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public LogicManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + this.Credentials = credentials; + if (this.Credentials != null) + { + this.Credentials.InitializeServiceClient(this); + } + + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling LogicManagementClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public LogicManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + this.Credentials = credentials; + if (this.Credentials != null) + { + this.Credentials.InitializeServiceClient(this); + } + + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public LogicManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + this.Credentials = credentials; + if (this.Credentials != null) + { + this.Credentials.InitializeServiceClient(this); + } + + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public LogicManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) + { + this.Credentials.InitializeServiceClient(this); + } + + } + /// + /// Initializes a new instance of the LogicManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Thrown when a required parameter is null + /// + public LogicManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) + { + this.Credentials.InitializeServiceClient(this); + } + + } + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + + /// + /// Initializes client properties. + /// + private void Initialize() + { + this.Workflows = new WorkflowsOperations(this); + this.WorkflowVersions = new WorkflowVersionsOperations(this); + this.WorkflowTriggers = new WorkflowTriggersOperations(this); + this.WorkflowVersionTriggers = new WorkflowVersionTriggersOperations(this); + this.WorkflowTriggerHistories = new WorkflowTriggerHistoriesOperations(this); + this.WorkflowRuns = new WorkflowRunsOperations(this); + this.WorkflowRunActions = new WorkflowRunActionsOperations(this); + this.WorkflowRunActionRepetitions = new WorkflowRunActionRepetitionsOperations(this); + this.WorkflowRunActionRepetitionsRequestHistories = new WorkflowRunActionRepetitionsRequestHistoriesOperations(this); + this.WorkflowRunActionRequestHistories = new WorkflowRunActionRequestHistoriesOperations(this); + this.WorkflowRunActionScopeRepetitions = new WorkflowRunActionScopeRepetitionsOperations(this); + this.WorkflowRunOperations = new WorkflowRunOperations(this); + this.IntegrationAccounts = new IntegrationAccountsOperations(this); + this.IntegrationAccountAssemblies = new IntegrationAccountAssembliesOperations(this); + this.IntegrationAccountBatchConfigurations = new IntegrationAccountBatchConfigurationsOperations(this); + this.IntegrationAccountSchemas = new IntegrationAccountSchemasOperations(this); + this.IntegrationAccountMaps = new IntegrationAccountMapsOperations(this); + this.IntegrationAccountPartners = new IntegrationAccountPartnersOperations(this); + this.IntegrationAccountAgreements = new IntegrationAccountAgreementsOperations(this); + this.IntegrationAccountCertificates = new IntegrationAccountCertificatesOperations(this); + this.IntegrationAccountSessions = new IntegrationAccountSessionsOperations(this); + this.Operations = new Operations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2018-07-01-preview"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List + { + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List + { + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AcknowledgementConnectionSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AcknowledgementConnectionSettings.cs new file mode 100644 index 000000000000..8ef502fb0bb7 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AcknowledgementConnectionSettings.cs @@ -0,0 +1,90 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement acknowledgement connection settings. + /// + public partial class AS2AcknowledgementConnectionSettings + { + /// + /// Initializes a new instance of the AS2AcknowledgementConnectionSettings class. + /// + public AS2AcknowledgementConnectionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2AcknowledgementConnectionSettings class. + /// + + /// The value indicating whether to ignore mismatch in certificate name. + /// + + /// The value indicating whether to support HTTP status code 'CONTINUE'. + /// + + /// The value indicating whether to keep the connection alive. + /// + + /// The value indicating whether to unfold the HTTP headers. + /// + public AS2AcknowledgementConnectionSettings(bool ignoreCertificateNameMismatch, bool supportHttpStatusCodeContinue, bool keepHttpConnectionAlive, bool unfoldHttpHeaders) + + { + this.IgnoreCertificateNameMismatch = ignoreCertificateNameMismatch; + this.SupportHttpStatusCodeContinue = supportHttpStatusCodeContinue; + this.KeepHttpConnectionAlive = keepHttpConnectionAlive; + this.UnfoldHttpHeaders = unfoldHttpHeaders; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to ignore mismatch in certificate + /// name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "ignoreCertificateNameMismatch")] + public bool IgnoreCertificateNameMismatch {get; set; } + + /// + /// Gets or sets the value indicating whether to support HTTP status code + /// 'CONTINUE'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "supportHttpStatusCodeContinue")] + public bool SupportHttpStatusCodeContinue {get; set; } + + /// + /// Gets or sets the value indicating whether to keep the connection alive. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keepHttpConnectionAlive")] + public bool KeepHttpConnectionAlive {get; set; } + + /// + /// Gets or sets the value indicating whether to unfold the HTTP headers. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "unfoldHttpHeaders")] + public bool UnfoldHttpHeaders {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AgreementContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AgreementContent.cs new file mode 100644 index 000000000000..3803f61c3fd0 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2AgreementContent.cs @@ -0,0 +1,83 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account AS2 agreement content. + /// + public partial class AS2AgreementContent + { + /// + /// Initializes a new instance of the AS2AgreementContent class. + /// + public AS2AgreementContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2AgreementContent class. + /// + + /// The AS2 one-way receive agreement. + /// + + /// The AS2 one-way send agreement. + /// + public AS2AgreementContent(AS2OneWayAgreement receiveAgreement, AS2OneWayAgreement sendAgreement) + + { + this.ReceiveAgreement = receiveAgreement; + this.SendAgreement = sendAgreement; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the AS2 one-way receive agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiveAgreement")] + public AS2OneWayAgreement ReceiveAgreement {get; set; } + + /// + /// Gets or sets the AS2 one-way send agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendAgreement")] + public AS2OneWayAgreement SendAgreement {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ReceiveAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiveAgreement"); + } + if (this.SendAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SendAgreement"); + } + if (this.ReceiveAgreement != null) + { + this.ReceiveAgreement.Validate(); + } + if (this.SendAgreement != null) + { + this.SendAgreement.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2EnvelopeSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2EnvelopeSettings.cs new file mode 100644 index 000000000000..a97622ffc7da --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2EnvelopeSettings.cs @@ -0,0 +1,110 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement envelope settings. + /// + public partial class AS2EnvelopeSettings + { + /// + /// Initializes a new instance of the AS2EnvelopeSettings class. + /// + public AS2EnvelopeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2EnvelopeSettings class. + /// + + /// The message content type. + /// + + /// The value indicating whether to transmit file name in mime header. + /// + + /// The template for file name. + /// + + /// The value indicating whether to suspend message on file name generation + /// error. + /// + + /// The value indicating whether to auto generate file name. + /// + public AS2EnvelopeSettings(string messageContentType, bool transmitFileNameInMimeHeader, string fileNameTemplate, bool suspendMessageOnFileNameGenerationError, bool autogenerateFileName) + + { + this.MessageContentType = messageContentType; + this.TransmitFileNameInMimeHeader = transmitFileNameInMimeHeader; + this.FileNameTemplate = fileNameTemplate; + this.SuspendMessageOnFileNameGenerationError = suspendMessageOnFileNameGenerationError; + this.AutogenerateFileName = autogenerateFileName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageContentType")] + public string MessageContentType {get; set; } + + /// + /// Gets or sets the value indicating whether to transmit file name in mime + /// header. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transmitFileNameInMimeHeader")] + public bool TransmitFileNameInMimeHeader {get; set; } + + /// + /// Gets or sets the template for file name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "fileNameTemplate")] + public string FileNameTemplate {get; set; } + + /// + /// Gets or sets the value indicating whether to suspend message on file name + /// generation error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "suspendMessageOnFileNameGenerationError")] + public bool SuspendMessageOnFileNameGenerationError {get; set; } + + /// + /// Gets or sets the value indicating whether to auto generate file name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "autogenerateFileName")] + public bool AutogenerateFileName {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageContentType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageContentType"); + } + if (this.FileNameTemplate == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FileNameTemplate"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ErrorSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ErrorSettings.cs new file mode 100644 index 000000000000..0d41f03d7f49 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ErrorSettings.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement error settings. + /// + public partial class AS2ErrorSettings + { + /// + /// Initializes a new instance of the AS2ErrorSettings class. + /// + public AS2ErrorSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2ErrorSettings class. + /// + + /// The value indicating whether to suspend duplicate message. + /// + + /// The value indicating whether to resend message If MDN is not received. + /// + public AS2ErrorSettings(bool suspendDuplicateMessage, bool resendIfMdnNotReceived) + + { + this.SuspendDuplicateMessage = suspendDuplicateMessage; + this.ResendIfMdnNotReceived = resendIfMdnNotReceived; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to suspend duplicate message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "suspendDuplicateMessage")] + public bool SuspendDuplicateMessage {get; set; } + + /// + /// Gets or sets the value indicating whether to resend message If MDN is not + /// received. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resendIfMDNNotReceived")] + public bool ResendIfMdnNotReceived {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MdnSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MdnSettings.cs new file mode 100644 index 000000000000..80fe6c1bae9d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MdnSettings.cs @@ -0,0 +1,149 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement mdn settings. + /// + public partial class AS2MdnSettings + { + /// + /// Initializes a new instance of the AS2MdnSettings class. + /// + public AS2MdnSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2MdnSettings class. + /// + + /// The value indicating whether to send or request a MDN. + /// + + /// The value indicating whether the MDN needs to be signed or not. + /// + + /// The value indicating whether to send the asynchronous MDN. + /// + + /// The receipt delivery URL. + /// + + /// The disposition notification to header value. + /// + + /// The value indicating whether to sign the outbound MDN if optional. + /// + + /// The MDN text. + /// + + /// The value indicating whether to send inbound MDN to message box. + /// + + /// The signing or hashing algorithm. + /// Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', + /// 'SHA2384', 'SHA2512' + public AS2MdnSettings(bool needMdn, bool signMdn, bool sendMdnAsynchronously, bool signOutboundMdnIfOptional, bool sendInboundMdnToMessageBox, string micHashingAlgorithm, string receiptDeliveryUrl = default(string), string dispositionNotificationTo = default(string), string mdnText = default(string)) + + { + this.NeedMdn = needMdn; + this.SignMdn = signMdn; + this.SendMdnAsynchronously = sendMdnAsynchronously; + this.ReceiptDeliveryUrl = receiptDeliveryUrl; + this.DispositionNotificationTo = dispositionNotificationTo; + this.SignOutboundMdnIfOptional = signOutboundMdnIfOptional; + this.MdnText = mdnText; + this.SendInboundMdnToMessageBox = sendInboundMdnToMessageBox; + this.MicHashingAlgorithm = micHashingAlgorithm; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to send or request a MDN. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needMDN")] + public bool NeedMdn {get; set; } + + /// + /// Gets or sets the value indicating whether the MDN needs to be signed or + /// not. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "signMDN")] + public bool SignMdn {get; set; } + + /// + /// Gets or sets the value indicating whether to send the asynchronous MDN. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendMDNAsynchronously")] + public bool SendMdnAsynchronously {get; set; } + + /// + /// Gets or sets the receipt delivery URL. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiptDeliveryUrl")] + public string ReceiptDeliveryUrl {get; set; } + + /// + /// Gets or sets the disposition notification to header value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dispositionNotificationTo")] + public string DispositionNotificationTo {get; set; } + + /// + /// Gets or sets the value indicating whether to sign the outbound MDN if + /// optional. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "signOutboundMDNIfOptional")] + public bool SignOutboundMdnIfOptional {get; set; } + + /// + /// Gets or sets the MDN text. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mdnText")] + public string MdnText {get; set; } + + /// + /// Gets or sets the value indicating whether to send inbound MDN to message + /// box. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendInboundMDNToMessageBox")] + public bool SendInboundMdnToMessageBox {get; set; } + + /// + /// Gets or sets the signing or hashing algorithm. Possible values include: 'NotSpecified', 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "micHashingAlgorithm")] + public string MicHashingAlgorithm {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MicHashingAlgorithm == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MicHashingAlgorithm"); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MessageConnectionSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MessageConnectionSettings.cs new file mode 100644 index 000000000000..242b73ab5903 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2MessageConnectionSettings.cs @@ -0,0 +1,90 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement message connection settings. + /// + public partial class AS2MessageConnectionSettings + { + /// + /// Initializes a new instance of the AS2MessageConnectionSettings class. + /// + public AS2MessageConnectionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2MessageConnectionSettings class. + /// + + /// The value indicating whether to ignore mismatch in certificate name. + /// + + /// The value indicating whether to support HTTP status code 'CONTINUE'. + /// + + /// The value indicating whether to keep the connection alive. + /// + + /// The value indicating whether to unfold the HTTP headers. + /// + public AS2MessageConnectionSettings(bool ignoreCertificateNameMismatch, bool supportHttpStatusCodeContinue, bool keepHttpConnectionAlive, bool unfoldHttpHeaders) + + { + this.IgnoreCertificateNameMismatch = ignoreCertificateNameMismatch; + this.SupportHttpStatusCodeContinue = supportHttpStatusCodeContinue; + this.KeepHttpConnectionAlive = keepHttpConnectionAlive; + this.UnfoldHttpHeaders = unfoldHttpHeaders; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to ignore mismatch in certificate + /// name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "ignoreCertificateNameMismatch")] + public bool IgnoreCertificateNameMismatch {get; set; } + + /// + /// Gets or sets the value indicating whether to support HTTP status code + /// 'CONTINUE'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "supportHttpStatusCodeContinue")] + public bool SupportHttpStatusCodeContinue {get; set; } + + /// + /// Gets or sets the value indicating whether to keep the connection alive. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keepHttpConnectionAlive")] + public bool KeepHttpConnectionAlive {get; set; } + + /// + /// Gets or sets the value indicating whether to unfold the HTTP headers. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "unfoldHttpHeaders")] + public bool UnfoldHttpHeaders {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2OneWayAgreement.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2OneWayAgreement.cs new file mode 100644 index 000000000000..40a7fe248468 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2OneWayAgreement.cs @@ -0,0 +1,101 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account AS2 one-way agreement. + /// + public partial class AS2OneWayAgreement + { + /// + /// Initializes a new instance of the AS2OneWayAgreement class. + /// + public AS2OneWayAgreement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2OneWayAgreement class. + /// + + /// The sender business identity + /// + + /// The receiver business identity + /// + + /// The AS2 protocol settings. + /// + public AS2OneWayAgreement(BusinessIdentity senderBusinessIdentity, BusinessIdentity receiverBusinessIdentity, AS2ProtocolSettings protocolSettings) + + { + this.SenderBusinessIdentity = senderBusinessIdentity; + this.ReceiverBusinessIdentity = receiverBusinessIdentity; + this.ProtocolSettings = protocolSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sender business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderBusinessIdentity")] + public BusinessIdentity SenderBusinessIdentity {get; set; } + + /// + /// Gets or sets the receiver business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverBusinessIdentity")] + public BusinessIdentity ReceiverBusinessIdentity {get; set; } + + /// + /// Gets or sets the AS2 protocol settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolSettings")] + public AS2ProtocolSettings ProtocolSettings {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SenderBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SenderBusinessIdentity"); + } + if (this.ReceiverBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiverBusinessIdentity"); + } + if (this.ProtocolSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProtocolSettings"); + } + if (this.SenderBusinessIdentity != null) + { + this.SenderBusinessIdentity.Validate(); + } + if (this.ReceiverBusinessIdentity != null) + { + this.ReceiverBusinessIdentity.Validate(); + } + if (this.ProtocolSettings != null) + { + this.ProtocolSettings.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ProtocolSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ProtocolSettings.cs new file mode 100644 index 000000000000..1c790bcb4c5e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ProtocolSettings.cs @@ -0,0 +1,173 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement protocol settings. + /// + public partial class AS2ProtocolSettings + { + /// + /// Initializes a new instance of the AS2ProtocolSettings class. + /// + public AS2ProtocolSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2ProtocolSettings class. + /// + + /// The message connection settings. + /// + + /// The acknowledgement connection settings. + /// + + /// The MDN settings. + /// + + /// The security settings. + /// + + /// The validation settings. + /// + + /// The envelope settings. + /// + + /// The error settings. + /// + public AS2ProtocolSettings(AS2MessageConnectionSettings messageConnectionSettings, AS2AcknowledgementConnectionSettings acknowledgementConnectionSettings, AS2MdnSettings mdnSettings, AS2SecuritySettings securitySettings, AS2ValidationSettings validationSettings, AS2EnvelopeSettings envelopeSettings, AS2ErrorSettings errorSettings) + + { + this.MessageConnectionSettings = messageConnectionSettings; + this.AcknowledgementConnectionSettings = acknowledgementConnectionSettings; + this.MdnSettings = mdnSettings; + this.SecuritySettings = securitySettings; + this.ValidationSettings = validationSettings; + this.EnvelopeSettings = envelopeSettings; + this.ErrorSettings = errorSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message connection settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageConnectionSettings")] + public AS2MessageConnectionSettings MessageConnectionSettings {get; set; } + + /// + /// Gets or sets the acknowledgement connection settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementConnectionSettings")] + public AS2AcknowledgementConnectionSettings AcknowledgementConnectionSettings {get; set; } + + /// + /// Gets or sets the MDN settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mdnSettings")] + public AS2MdnSettings MdnSettings {get; set; } + + /// + /// Gets or sets the security settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "securitySettings")] + public AS2SecuritySettings SecuritySettings {get; set; } + + /// + /// Gets or sets the validation settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validationSettings")] + public AS2ValidationSettings ValidationSettings {get; set; } + + /// + /// Gets or sets the envelope settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "envelopeSettings")] + public AS2EnvelopeSettings EnvelopeSettings {get; set; } + + /// + /// Gets or sets the error settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "errorSettings")] + public AS2ErrorSettings ErrorSettings {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageConnectionSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageConnectionSettings"); + } + if (this.AcknowledgementConnectionSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AcknowledgementConnectionSettings"); + } + if (this.MdnSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MdnSettings"); + } + if (this.SecuritySettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SecuritySettings"); + } + if (this.ValidationSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ValidationSettings"); + } + if (this.EnvelopeSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "EnvelopeSettings"); + } + if (this.ErrorSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ErrorSettings"); + } + if (this.MessageConnectionSettings != null) + { + this.MessageConnectionSettings.Validate(); + } + if (this.AcknowledgementConnectionSettings != null) + { + this.AcknowledgementConnectionSettings.Validate(); + } + if (this.MdnSettings != null) + { + this.MdnSettings.Validate(); + } + if (this.SecuritySettings != null) + { + this.SecuritySettings.Validate(); + } + if (this.ValidationSettings != null) + { + this.ValidationSettings.Validate(); + } + if (this.EnvelopeSettings != null) + { + this.EnvelopeSettings.Validate(); + } + if (this.ErrorSettings != null) + { + this.ErrorSettings.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2SecuritySettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2SecuritySettings.cs new file mode 100644 index 000000000000..e78c69532dea --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2SecuritySettings.cs @@ -0,0 +1,156 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement security settings. + /// + public partial class AS2SecuritySettings + { + /// + /// Initializes a new instance of the AS2SecuritySettings class. + /// + public AS2SecuritySettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2SecuritySettings class. + /// + + /// The value indicating whether to send or request a MDN. + /// + + /// The name of the signing certificate. + /// + + /// The name of the encryption certificate. + /// + + /// The value indicating whether to enable NRR for inbound encoded messages. + /// + + /// The value indicating whether to enable NRR for inbound decoded messages. + /// + + /// The value indicating whether to enable NRR for outbound MDN. + /// + + /// The value indicating whether to enable NRR for outbound encoded messages. + /// + + /// The value indicating whether to enable NRR for outbound decoded messages. + /// + + /// The value indicating whether to enable NRR for inbound MDN. + /// + + /// The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, + /// ShaHyphenHashSize, Sha2UnderscoreHashSize. + /// + public AS2SecuritySettings(bool overrideGroupSigningCertificate, bool enableNrrForInboundEncodedMessages, bool enableNrrForInboundDecodedMessages, bool enableNrrForOutboundMdn, bool enableNrrForOutboundEncodedMessages, bool enableNrrForOutboundDecodedMessages, bool enableNrrForInboundMdn, string signingCertificateName = default(string), string encryptionCertificateName = default(string), string sha2AlgorithmFormat = default(string)) + + { + this.OverrideGroupSigningCertificate = overrideGroupSigningCertificate; + this.SigningCertificateName = signingCertificateName; + this.EncryptionCertificateName = encryptionCertificateName; + this.EnableNrrForInboundEncodedMessages = enableNrrForInboundEncodedMessages; + this.EnableNrrForInboundDecodedMessages = enableNrrForInboundDecodedMessages; + this.EnableNrrForOutboundMdn = enableNrrForOutboundMdn; + this.EnableNrrForOutboundEncodedMessages = enableNrrForOutboundEncodedMessages; + this.EnableNrrForOutboundDecodedMessages = enableNrrForOutboundDecodedMessages; + this.EnableNrrForInboundMdn = enableNrrForInboundMdn; + this.Sha2AlgorithmFormat = sha2AlgorithmFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to send or request a MDN. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "overrideGroupSigningCertificate")] + public bool OverrideGroupSigningCertificate {get; set; } + + /// + /// Gets or sets the name of the signing certificate. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "signingCertificateName")] + public string SigningCertificateName {get; set; } + + /// + /// Gets or sets the name of the encryption certificate. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionCertificateName")] + public string EncryptionCertificateName {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for inbound encoded + /// messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForInboundEncodedMessages")] + public bool EnableNrrForInboundEncodedMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for inbound decoded + /// messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForInboundDecodedMessages")] + public bool EnableNrrForInboundDecodedMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for outbound MDN. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForOutboundMDN")] + public bool EnableNrrForOutboundMdn {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for outbound + /// encoded messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForOutboundEncodedMessages")] + public bool EnableNrrForOutboundEncodedMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for outbound + /// decoded messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForOutboundDecodedMessages")] + public bool EnableNrrForOutboundDecodedMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to enable NRR for inbound MDN. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNRRForInboundMDN")] + public bool EnableNrrForInboundMdn {get; set; } + + /// + /// Gets or sets the Sha2 algorithm format. Valid values are Sha2, ShaHashSize, + /// ShaHyphenHashSize, Sha2UnderscoreHashSize. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sha2AlgorithmFormat")] + public string Sha2AlgorithmFormat {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ValidationSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ValidationSettings.cs new file mode 100644 index 000000000000..a9fbb419ecaa --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AS2ValidationSettings.cs @@ -0,0 +1,161 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The AS2 agreement validation settings. + /// + public partial class AS2ValidationSettings + { + /// + /// Initializes a new instance of the AS2ValidationSettings class. + /// + public AS2ValidationSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AS2ValidationSettings class. + /// + + /// The value indicating whether to override incoming message properties with + /// those in agreement. + /// + + /// The value indicating whether the message has to be encrypted. + /// + + /// The value indicating whether the message has to be signed. + /// + + /// The value indicating whether the message has to be compressed. + /// + + /// The value indicating whether to check for duplicate message. + /// + + /// The number of days to look back for duplicate interchange. + /// + + /// The value indicating whether to check for certificate revocation list on + /// send. + /// + + /// The value indicating whether to check for certificate revocation list on + /// receive. + /// + + /// The encryption algorithm. + /// Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', + /// 'AES192', 'AES256' + + /// The signing algorithm. + /// Possible values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', + /// 'SHA2384', 'SHA2512' + public AS2ValidationSettings(bool overrideMessageProperties, bool encryptMessage, bool signMessage, bool compressMessage, bool checkDuplicateMessage, int interchangeDuplicatesValidityDays, bool checkCertificateRevocationListOnSend, bool checkCertificateRevocationListOnReceive, string encryptionAlgorithm, string signingAlgorithm = default(string)) + + { + this.OverrideMessageProperties = overrideMessageProperties; + this.EncryptMessage = encryptMessage; + this.SignMessage = signMessage; + this.CompressMessage = compressMessage; + this.CheckDuplicateMessage = checkDuplicateMessage; + this.InterchangeDuplicatesValidityDays = interchangeDuplicatesValidityDays; + this.CheckCertificateRevocationListOnSend = checkCertificateRevocationListOnSend; + this.CheckCertificateRevocationListOnReceive = checkCertificateRevocationListOnReceive; + this.EncryptionAlgorithm = encryptionAlgorithm; + this.SigningAlgorithm = signingAlgorithm; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to override incoming message + /// properties with those in agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "overrideMessageProperties")] + public bool OverrideMessageProperties {get; set; } + + /// + /// Gets or sets the value indicating whether the message has to be encrypted. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptMessage")] + public bool EncryptMessage {get; set; } + + /// + /// Gets or sets the value indicating whether the message has to be signed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "signMessage")] + public bool SignMessage {get; set; } + + /// + /// Gets or sets the value indicating whether the message has to be compressed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "compressMessage")] + public bool CompressMessage {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateMessage")] + public bool CheckDuplicateMessage {get; set; } + + /// + /// Gets or sets the number of days to look back for duplicate interchange. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeDuplicatesValidityDays")] + public int InterchangeDuplicatesValidityDays {get; set; } + + /// + /// Gets or sets the value indicating whether to check for certificate + /// revocation list on send. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkCertificateRevocationListOnSend")] + public bool CheckCertificateRevocationListOnSend {get; set; } + + /// + /// Gets or sets the value indicating whether to check for certificate + /// revocation list on receive. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkCertificateRevocationListOnReceive")] + public bool CheckCertificateRevocationListOnReceive {get; set; } + + /// + /// Gets or sets the encryption algorithm. Possible values include: 'NotSpecified', 'None', 'DES3', 'RC2', 'AES128', 'AES192', 'AES256' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "encryptionAlgorithm")] + public string EncryptionAlgorithm {get; set; } + + /// + /// Gets or sets the signing algorithm. Possible values include: 'NotSpecified', 'Default', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "signingAlgorithm")] + public string SigningAlgorithm {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.EncryptionAlgorithm == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "EncryptionAlgorithm"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementContent.cs new file mode 100644 index 000000000000..66c4cf1de8a3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementContent.cs @@ -0,0 +1,89 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account agreement content. + /// + public partial class AgreementContent + { + /// + /// Initializes a new instance of the AgreementContent class. + /// + public AgreementContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgreementContent class. + /// + + /// The AS2 agreement content. + /// + + /// The X12 agreement content. + /// + + /// The EDIFACT agreement content. + /// + public AgreementContent(AS2AgreementContent as2 = default(AS2AgreementContent), X12AgreementContent x12 = default(X12AgreementContent), EdifactAgreementContent edifact = default(EdifactAgreementContent)) + + { + this.AS2 = as2; + this.X12 = x12; + this.Edifact = edifact; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the AS2 agreement content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "aS2")] + public AS2AgreementContent AS2 {get; set; } + + /// + /// Gets or sets the X12 agreement content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x12")] + public X12AgreementContent X12 {get; set; } + + /// + /// Gets or sets the EDIFACT agreement content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "edifact")] + public EdifactAgreementContent Edifact {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.AS2 != null) + { + this.AS2.Validate(); + } + if (this.X12 != null) + { + this.X12.Validate(); + } + if (this.Edifact != null) + { + this.Edifact.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementType.cs new file mode 100644 index 000000000000..4e9596439d07 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AgreementType.cs @@ -0,0 +1,63 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for AgreementType. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum AgreementType + { + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] + NotSpecified, + [System.Runtime.Serialization.EnumMember(Value = "AS2")] + AS2, + [System.Runtime.Serialization.EnumMember(Value = "X12")] + X12, + [System.Runtime.Serialization.EnumMember(Value = "Edifact")] + Edifact + } + internal static class AgreementTypeEnumExtension + { + internal static string ToSerializedValue(this AgreementType? value) + { + return value == null ? null : ((AgreementType)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this AgreementType value) + { + switch( value ) + { + case AgreementType.NotSpecified: + return "NotSpecified"; + case AgreementType.AS2: + return "AS2"; + case AgreementType.X12: + return "X12"; + case AgreementType.Edifact: + return "Edifact"; + } + return null; + } + internal static AgreementType? ParseAgreementType(this string value) + { + switch( value ) + { + case "NotSpecified": + return AgreementType.NotSpecified; + case "AS2": + return AgreementType.AS2; + case "X12": + return AgreementType.X12; + case "Edifact": + return AgreementType.Edifact; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactContentPropertiesDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactContentPropertiesDefinition.cs new file mode 100644 index 000000000000..15f1b8dad000 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactContentPropertiesDefinition.cs @@ -0,0 +1,78 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The artifact content properties definition. + /// + public partial class ArtifactContentPropertiesDefinition : ArtifactProperties + { + /// + /// Initializes a new instance of the ArtifactContentPropertiesDefinition class. + /// + public ArtifactContentPropertiesDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactContentPropertiesDefinition class. + /// + + /// The artifact creation time. + /// + + /// The artifact changed time. + /// + + /// Anything + /// + + /// Anything + /// + + /// The content type. + /// + + /// The content link. + /// + public ArtifactContentPropertiesDefinition(System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), object content = default(object), string contentType = default(string), ContentLink contentLink = default(ContentLink)) + + : base(createdTime, changedTime, metadata) + { + this.Content = content; + this.ContentType = contentType; + this.ContentLink = contentLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets anything + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public object Content {get; set; } + + /// + /// Gets or sets the content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentType")] + public string ContentType {get; set; } + + /// + /// Gets or sets the content link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentLink")] + public ContentLink ContentLink {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactProperties.cs new file mode 100644 index 000000000000..dafe60e417ac --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ArtifactProperties.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The artifact properties definition. + /// + public partial class ArtifactProperties + { + /// + /// Initializes a new instance of the ArtifactProperties class. + /// + public ArtifactProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArtifactProperties class. + /// + + /// The artifact creation time. + /// + + /// The artifact changed time. + /// + + /// Anything + /// + public ArtifactProperties(System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the artifact creation time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; set; } + + /// + /// Gets or sets the artifact changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; set; } + + /// + /// Gets or sets anything + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyDefinition.cs new file mode 100644 index 000000000000..febf2622ef50 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyDefinition.cs @@ -0,0 +1,81 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The assembly definition. + /// + public partial class AssemblyDefinition : Resource + { + /// + /// Initializes a new instance of the AssemblyDefinition class. + /// + public AssemblyDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AssemblyDefinition class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The assembly properties. + /// + public AssemblyDefinition(AssemblyProperties properties, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, location, tags) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the assembly properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public AssemblyProperties Properties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Properties == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); + } + if (this.Properties != null) + { + this.Properties.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyProperties.cs new file mode 100644 index 000000000000..3dbb750cc20e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AssemblyProperties.cs @@ -0,0 +1,114 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The assembly properties definition. + /// + public partial class AssemblyProperties : ArtifactContentPropertiesDefinition + { + /// + /// Initializes a new instance of the AssemblyProperties class. + /// + public AssemblyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AssemblyProperties class. + /// + + /// The artifact creation time. + /// + + /// The artifact changed time. + /// + + /// Anything + /// + + /// Anything + /// + + /// The content type. + /// + + /// The content link. + /// + + /// The assembly name. + /// + + /// The assembly version. + /// + + /// The assembly culture. + /// + + /// The assembly public key token. + /// + public AssemblyProperties(string assemblyName, System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), object content = default(object), string contentType = default(string), ContentLink contentLink = default(ContentLink), string assemblyVersion = default(string), string assemblyCulture = default(string), string assemblyPublicKeyToken = default(string)) + + : base(createdTime, changedTime, metadata, content, contentType, contentLink) + { + this.AssemblyName = assemblyName; + this.AssemblyVersion = assemblyVersion; + this.AssemblyCulture = assemblyCulture; + this.AssemblyPublicKeyToken = assemblyPublicKeyToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the assembly name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "assemblyName")] + public string AssemblyName {get; set; } + + /// + /// Gets or sets the assembly version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "assemblyVersion")] + public string AssemblyVersion {get; set; } + + /// + /// Gets or sets the assembly culture. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "assemblyCulture")] + public string AssemblyCulture {get; set; } + + /// + /// Gets or sets the assembly public key token. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "assemblyPublicKeyToken")] + public string AssemblyPublicKeyToken {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.AssemblyName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AssemblyName"); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AzureResourceErrorInfo.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AzureResourceErrorInfo.cs new file mode 100644 index 000000000000..0fe52adcd746 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/AzureResourceErrorInfo.cs @@ -0,0 +1,87 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The azure resource error info. + /// + public partial class AzureResourceErrorInfo : ErrorInfo + { + /// + /// Initializes a new instance of the AzureResourceErrorInfo class. + /// + public AzureResourceErrorInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureResourceErrorInfo class. + /// + + /// The error code. + /// + + /// The error message. + /// + + /// The error details. + /// + public AzureResourceErrorInfo(string code, string message, System.Collections.Generic.IList details = default(System.Collections.Generic.IList)) + + : base(code) + { + this.Message = message; + this.Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the error message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } + + /// + /// Gets or sets the error details. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (this.Message == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Message"); + } + + if (this.Details != null) + { + foreach (var element in this.Details) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/B2BPartnerContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/B2BPartnerContent.cs new file mode 100644 index 000000000000..4721e8adf4e3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/B2BPartnerContent.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The B2B partner content. + /// + public partial class B2BPartnerContent + { + /// + /// Initializes a new instance of the B2BPartnerContent class. + /// + public B2BPartnerContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the B2BPartnerContent class. + /// + + /// The list of partner business identities. + /// + public B2BPartnerContent(System.Collections.Generic.IList businessIdentities = default(System.Collections.Generic.IList)) + + { + this.BusinessIdentities = businessIdentities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the list of partner business identities. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "businessIdentities")] + public System.Collections.Generic.IList BusinessIdentities {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfiguration.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfiguration.cs new file mode 100644 index 000000000000..7fdfe25236d6 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfiguration.cs @@ -0,0 +1,81 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The batch configuration resource definition. + /// + public partial class BatchConfiguration : Resource + { + /// + /// Initializes a new instance of the BatchConfiguration class. + /// + public BatchConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BatchConfiguration class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The batch configuration properties. + /// + public BatchConfiguration(BatchConfigurationProperties properties, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, location, tags) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the batch configuration properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public BatchConfigurationProperties Properties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Properties == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Properties"); + } + if (this.Properties != null) + { + this.Properties.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfigurationProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfigurationProperties.cs new file mode 100644 index 000000000000..63bd010a325b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchConfigurationProperties.cs @@ -0,0 +1,87 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The batch configuration properties definition. + /// + public partial class BatchConfigurationProperties : ArtifactProperties + { + /// + /// Initializes a new instance of the BatchConfigurationProperties class. + /// + public BatchConfigurationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BatchConfigurationProperties class. + /// + + /// The artifact creation time. + /// + + /// The artifact changed time. + /// + + /// Anything + /// + + /// The name of the batch group. + /// + + /// The batch release criteria. + /// + public BatchConfigurationProperties(string batchGroupName, BatchReleaseCriteria releaseCriteria, System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + : base(createdTime, changedTime, metadata) + { + this.BatchGroupName = batchGroupName; + this.ReleaseCriteria = releaseCriteria; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the name of the batch group. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchGroupName")] + public string BatchGroupName {get; set; } + + /// + /// Gets or sets the batch release criteria. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseCriteria")] + public BatchReleaseCriteria ReleaseCriteria {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.BatchGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "BatchGroupName"); + } + if (this.ReleaseCriteria == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReleaseCriteria"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchReleaseCriteria.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchReleaseCriteria.cs new file mode 100644 index 000000000000..3acc559f24f7 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BatchReleaseCriteria.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The batch release criteria. + /// + public partial class BatchReleaseCriteria + { + /// + /// Initializes a new instance of the BatchReleaseCriteria class. + /// + public BatchReleaseCriteria() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BatchReleaseCriteria class. + /// + + /// The message count. + /// + + /// The batch size in bytes. + /// + + /// The recurrence. + /// + public BatchReleaseCriteria(int? messageCount = default(int?), int? batchSize = default(int?), WorkflowTriggerRecurrence recurrence = default(WorkflowTriggerRecurrence)) + + { + this.MessageCount = messageCount; + this.BatchSize = batchSize; + this.Recurrence = recurrence; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message count. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageCount")] + public int? MessageCount {get; set; } + + /// + /// Gets or sets the batch size in bytes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchSize")] + public int? BatchSize {get; set; } + + /// + /// Gets or sets the recurrence. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "recurrence")] + public WorkflowTriggerRecurrence Recurrence {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BusinessIdentity.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BusinessIdentity.cs new file mode 100644 index 000000000000..a83b12ede2a3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/BusinessIdentity.cs @@ -0,0 +1,78 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account partner's business identity. + /// + public partial class BusinessIdentity + { + /// + /// Initializes a new instance of the BusinessIdentity class. + /// + public BusinessIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BusinessIdentity class. + /// + + /// The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32 + /// + + /// The user defined business identity value. + /// + public BusinessIdentity(string qualifier, string value) + + { + this.Qualifier = qualifier; + this.Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, + /// 32 + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "qualifier")] + public string Qualifier {get; set; } + + /// + /// Gets or sets the user defined business identity value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Qualifier == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Qualifier"); + } + if (this.Value == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Value"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/CallbackUrl.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/CallbackUrl.cs new file mode 100644 index 000000000000..ba4e2e16ee01 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/CallbackUrl.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The callback url. + /// + public partial class CallbackUrl + { + /// + /// Initializes a new instance of the CallbackUrl class. + /// + public CallbackUrl() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CallbackUrl class. + /// + + /// The URL value. + /// + public CallbackUrl(string value = default(string)) + + { + this.Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the URL value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentHash.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentHash.cs new file mode 100644 index 000000000000..56279402b2be --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentHash.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The content hash. + /// + public partial class ContentHash + { + /// + /// Initializes a new instance of the ContentHash class. + /// + public ContentHash() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContentHash class. + /// + + /// The algorithm of the content hash. + /// + + /// The value of the content hash. + /// + public ContentHash(string algorithm = default(string), string value = default(string)) + + { + this.Algorithm = algorithm; + this.Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the algorithm of the content hash. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "algorithm")] + public string Algorithm {get; set; } + + /// + /// Gets or sets the value of the content hash. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentLink.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentLink.cs new file mode 100644 index 000000000000..b58c34620d44 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ContentLink.cs @@ -0,0 +1,88 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The content link. + /// + public partial class ContentLink + { + /// + /// Initializes a new instance of the ContentLink class. + /// + public ContentLink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContentLink class. + /// + + /// The content link URI. + /// + + /// The content version. + /// + + /// The content size. + /// + + /// The content hash. + /// + + /// The metadata. + /// + public ContentLink(string uri = default(string), string contentVersion = default(string), long? contentSize = default(long?), ContentHash contentHash = default(ContentHash), object metadata = default(object)) + + { + this.Uri = uri; + this.ContentVersion = contentVersion; + this.ContentSize = contentSize; + this.ContentHash = contentHash; + this.Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the content link URI. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } + + /// + /// Gets or sets the content version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentVersion")] + public string ContentVersion {get; set; } + + /// + /// Gets or sets the content size. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentSize")] + public long? ContentSize {get; set; } + + /// + /// Gets or sets the content hash. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentHash")] + public ContentHash ContentHash {get; set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Correlation.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Correlation.cs new file mode 100644 index 000000000000..cfa581530078 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Correlation.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The correlation property. + /// + public partial class Correlation + { + /// + /// Initializes a new instance of the Correlation class. + /// + public Correlation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Correlation class. + /// + + /// The client tracking id. + /// + public Correlation(string clientTrackingId = default(string)) + + { + this.ClientTrackingId = clientTrackingId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the client tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "clientTrackingId")] + public string ClientTrackingId {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DayOfWeek.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..4995beb59b68 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DayOfWeek.cs @@ -0,0 +1,81 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for DayOfWeek. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum DayOfWeek + { + [System.Runtime.Serialization.EnumMember(Value = "Sunday")] + Sunday, + [System.Runtime.Serialization.EnumMember(Value = "Monday")] + Monday, + [System.Runtime.Serialization.EnumMember(Value = "Tuesday")] + Tuesday, + [System.Runtime.Serialization.EnumMember(Value = "Wednesday")] + Wednesday, + [System.Runtime.Serialization.EnumMember(Value = "Thursday")] + Thursday, + [System.Runtime.Serialization.EnumMember(Value = "Friday")] + Friday, + [System.Runtime.Serialization.EnumMember(Value = "Saturday")] + Saturday + } + internal static class DayOfWeekEnumExtension + { + internal static string ToSerializedValue(this DayOfWeek? value) + { + return value == null ? null : ((DayOfWeek)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this DayOfWeek value) + { + switch( value ) + { + case DayOfWeek.Sunday: + return "Sunday"; + case DayOfWeek.Monday: + return "Monday"; + case DayOfWeek.Tuesday: + return "Tuesday"; + case DayOfWeek.Wednesday: + return "Wednesday"; + case DayOfWeek.Thursday: + return "Thursday"; + case DayOfWeek.Friday: + return "Friday"; + case DayOfWeek.Saturday: + return "Saturday"; + } + return null; + } + internal static DayOfWeek? ParseDayOfWeek(this string value) + { + switch( value ) + { + case "Sunday": + return DayOfWeek.Sunday; + case "Monday": + return DayOfWeek.Monday; + case "Tuesday": + return DayOfWeek.Tuesday; + case "Wednesday": + return DayOfWeek.Wednesday; + case "Thursday": + return DayOfWeek.Thursday; + case "Friday": + return DayOfWeek.Friday; + case "Saturday": + return DayOfWeek.Saturday; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DaysOfWeek.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DaysOfWeek.cs new file mode 100644 index 000000000000..512697c30760 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/DaysOfWeek.cs @@ -0,0 +1,81 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for DaysOfWeek. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum DaysOfWeek + { + [System.Runtime.Serialization.EnumMember(Value = "Sunday")] + Sunday, + [System.Runtime.Serialization.EnumMember(Value = "Monday")] + Monday, + [System.Runtime.Serialization.EnumMember(Value = "Tuesday")] + Tuesday, + [System.Runtime.Serialization.EnumMember(Value = "Wednesday")] + Wednesday, + [System.Runtime.Serialization.EnumMember(Value = "Thursday")] + Thursday, + [System.Runtime.Serialization.EnumMember(Value = "Friday")] + Friday, + [System.Runtime.Serialization.EnumMember(Value = "Saturday")] + Saturday + } + internal static class DaysOfWeekEnumExtension + { + internal static string ToSerializedValue(this DaysOfWeek? value) + { + return value == null ? null : ((DaysOfWeek)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this DaysOfWeek value) + { + switch( value ) + { + case DaysOfWeek.Sunday: + return "Sunday"; + case DaysOfWeek.Monday: + return "Monday"; + case DaysOfWeek.Tuesday: + return "Tuesday"; + case DaysOfWeek.Wednesday: + return "Wednesday"; + case DaysOfWeek.Thursday: + return "Thursday"; + case DaysOfWeek.Friday: + return "Friday"; + case DaysOfWeek.Saturday: + return "Saturday"; + } + return null; + } + internal static DaysOfWeek? ParseDaysOfWeek(this string value) + { + switch( value ) + { + case "Sunday": + return DaysOfWeek.Sunday; + case "Monday": + return DaysOfWeek.Monday; + case "Tuesday": + return DaysOfWeek.Tuesday; + case "Wednesday": + return DaysOfWeek.Wednesday; + case "Thursday": + return DaysOfWeek.Thursday; + case "Friday": + return DaysOfWeek.Friday; + case "Saturday": + return DaysOfWeek.Saturday; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAcknowledgementSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAcknowledgementSettings.cs new file mode 100644 index 000000000000..16e98011d22e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAcknowledgementSettings.cs @@ -0,0 +1,166 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement acknowledgement settings. + /// + public partial class EdifactAcknowledgementSettings + { + /// + /// Initializes a new instance of the EdifactAcknowledgementSettings class. + /// + public EdifactAcknowledgementSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactAcknowledgementSettings class. + /// + + /// The value indicating whether technical acknowledgement is needed. + /// + + /// The value indicating whether to batch the technical acknowledgements. + /// + + /// The value indicating whether functional acknowledgement is needed. + /// + + /// The value indicating whether to batch functional acknowledgements. + /// + + /// The value indicating whether a loop is needed for valid messages. + /// + + /// The value indicating whether to send synchronous acknowledgement. + /// + + /// The acknowledgement control number prefix. + /// + + /// The acknowledgement control number suffix. + /// + + /// The acknowledgement control number lower bound. + /// + + /// The acknowledgement control number upper bound. + /// + + /// The value indicating whether to rollover acknowledgement control number. + /// + public EdifactAcknowledgementSettings(bool needTechnicalAcknowledgement, bool batchTechnicalAcknowledgements, bool needFunctionalAcknowledgement, bool batchFunctionalAcknowledgements, bool needLoopForValidMessages, bool sendSynchronousAcknowledgement, int acknowledgementControlNumberLowerBound, int acknowledgementControlNumberUpperBound, bool rolloverAcknowledgementControlNumber, string acknowledgementControlNumberPrefix = default(string), string acknowledgementControlNumberSuffix = default(string)) + + { + this.NeedTechnicalAcknowledgement = needTechnicalAcknowledgement; + this.BatchTechnicalAcknowledgements = batchTechnicalAcknowledgements; + this.NeedFunctionalAcknowledgement = needFunctionalAcknowledgement; + this.BatchFunctionalAcknowledgements = batchFunctionalAcknowledgements; + this.NeedLoopForValidMessages = needLoopForValidMessages; + this.SendSynchronousAcknowledgement = sendSynchronousAcknowledgement; + this.AcknowledgementControlNumberPrefix = acknowledgementControlNumberPrefix; + this.AcknowledgementControlNumberSuffix = acknowledgementControlNumberSuffix; + this.AcknowledgementControlNumberLowerBound = acknowledgementControlNumberLowerBound; + this.AcknowledgementControlNumberUpperBound = acknowledgementControlNumberUpperBound; + this.RolloverAcknowledgementControlNumber = rolloverAcknowledgementControlNumber; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether technical acknowledgement is + /// needed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needTechnicalAcknowledgement")] + public bool NeedTechnicalAcknowledgement {get; set; } + + /// + /// Gets or sets the value indicating whether to batch the technical + /// acknowledgements. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchTechnicalAcknowledgements")] + public bool BatchTechnicalAcknowledgements {get; set; } + + /// + /// Gets or sets the value indicating whether functional acknowledgement is + /// needed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needFunctionalAcknowledgement")] + public bool NeedFunctionalAcknowledgement {get; set; } + + /// + /// Gets or sets the value indicating whether to batch functional + /// acknowledgements. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchFunctionalAcknowledgements")] + public bool BatchFunctionalAcknowledgements {get; set; } + + /// + /// Gets or sets the value indicating whether a loop is needed for valid + /// messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needLoopForValidMessages")] + public bool NeedLoopForValidMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to send synchronous + /// acknowledgement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendSynchronousAcknowledgement")] + public bool SendSynchronousAcknowledgement {get; set; } + + /// + /// Gets or sets the acknowledgement control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberPrefix")] + public string AcknowledgementControlNumberPrefix {get; set; } + + /// + /// Gets or sets the acknowledgement control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberSuffix")] + public string AcknowledgementControlNumberSuffix {get; set; } + + /// + /// Gets or sets the acknowledgement control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberLowerBound")] + public int AcknowledgementControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the acknowledgement control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberUpperBound")] + public int AcknowledgementControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover acknowledgement + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverAcknowledgementControlNumber")] + public bool RolloverAcknowledgementControlNumber {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAgreementContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAgreementContent.cs new file mode 100644 index 000000000000..54fb5c1f9a37 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactAgreementContent.cs @@ -0,0 +1,83 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement content. + /// + public partial class EdifactAgreementContent + { + /// + /// Initializes a new instance of the EdifactAgreementContent class. + /// + public EdifactAgreementContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactAgreementContent class. + /// + + /// The EDIFACT one-way receive agreement. + /// + + /// The EDIFACT one-way send agreement. + /// + public EdifactAgreementContent(EdifactOneWayAgreement receiveAgreement, EdifactOneWayAgreement sendAgreement) + + { + this.ReceiveAgreement = receiveAgreement; + this.SendAgreement = sendAgreement; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the EDIFACT one-way receive agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiveAgreement")] + public EdifactOneWayAgreement ReceiveAgreement {get; set; } + + /// + /// Gets or sets the EDIFACT one-way send agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendAgreement")] + public EdifactOneWayAgreement SendAgreement {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ReceiveAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiveAgreement"); + } + if (this.SendAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SendAgreement"); + } + if (this.ReceiveAgreement != null) + { + this.ReceiveAgreement.Validate(); + } + if (this.SendAgreement != null) + { + this.SendAgreement.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactCharacterSet.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactCharacterSet.cs new file mode 100644 index 000000000000..6994045ec0ad --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactCharacterSet.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for EdifactCharacterSet. + /// + + + public static class EdifactCharacterSet + { + public const string NotSpecified = "NotSpecified"; + public const string Unob = "UNOB"; + public const string Unoa = "UNOA"; + public const string Unoc = "UNOC"; + public const string Unod = "UNOD"; + public const string Unoe = "UNOE"; + public const string Unof = "UNOF"; + public const string Unog = "UNOG"; + public const string Unoh = "UNOH"; + public const string Unoi = "UNOI"; + public const string Unoj = "UNOJ"; + public const string Unok = "UNOK"; + public const string Unox = "UNOX"; + public const string Unoy = "UNOY"; + public const string Keca = "KECA"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDecimalIndicator.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDecimalIndicator.cs new file mode 100644 index 000000000000..4635b4358263 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDecimalIndicator.cs @@ -0,0 +1,57 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for EdifactDecimalIndicator. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum EdifactDecimalIndicator + { + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] + NotSpecified, + [System.Runtime.Serialization.EnumMember(Value = "Comma")] + Comma, + [System.Runtime.Serialization.EnumMember(Value = "Decimal")] + Decimal + } + internal static class EdifactDecimalIndicatorEnumExtension + { + internal static string ToSerializedValue(this EdifactDecimalIndicator? value) + { + return value == null ? null : ((EdifactDecimalIndicator)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this EdifactDecimalIndicator value) + { + switch( value ) + { + case EdifactDecimalIndicator.NotSpecified: + return "NotSpecified"; + case EdifactDecimalIndicator.Comma: + return "Comma"; + case EdifactDecimalIndicator.Decimal: + return "Decimal"; + } + return null; + } + internal static EdifactDecimalIndicator? ParseEdifactDecimalIndicator(this string value) + { + switch( value ) + { + case "NotSpecified": + return EdifactDecimalIndicator.NotSpecified; + case "Comma": + return EdifactDecimalIndicator.Comma; + case "Decimal": + return EdifactDecimalIndicator.Decimal; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDelimiterOverride.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDelimiterOverride.cs new file mode 100644 index 000000000000..5f8bfa41258e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactDelimiterOverride.cs @@ -0,0 +1,175 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact delimiter override settings. + /// + public partial class EdifactDelimiterOverride + { + /// + /// Initializes a new instance of the EdifactDelimiterOverride class. + /// + public EdifactDelimiterOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactDelimiterOverride class. + /// + + /// The message id. + /// + + /// The message version. + /// + + /// The message release. + /// + + /// The data element separator. + /// + + /// The component separator. + /// + + /// The segment terminator. + /// + + /// The repetition separator. + /// + + /// The segment terminator suffix. + /// Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + + /// The decimal point indicator. + /// Possible values include: 'NotSpecified', 'Comma', 'Decimal' + + /// The release indicator. + /// + + /// The message association assigned code. + /// + + /// The target namespace on which this delimiter settings has to be applied. + /// + public EdifactDelimiterOverride(int dataElementSeparator, int componentSeparator, int segmentTerminator, int repetitionSeparator, SegmentTerminatorSuffix segmentTerminatorSuffix, EdifactDecimalIndicator decimalPointIndicator, int releaseIndicator, string messageId = default(string), string messageVersion = default(string), string messageRelease = default(string), string messageAssociationAssignedCode = default(string), string targetNamespace = default(string)) + + { + this.MessageId = messageId; + this.MessageVersion = messageVersion; + this.MessageRelease = messageRelease; + this.DataElementSeparator = dataElementSeparator; + this.ComponentSeparator = componentSeparator; + this.SegmentTerminator = segmentTerminator; + this.RepetitionSeparator = repetitionSeparator; + this.SegmentTerminatorSuffix = segmentTerminatorSuffix; + this.DecimalPointIndicator = decimalPointIndicator; + this.ReleaseIndicator = releaseIndicator; + this.MessageAssociationAssignedCode = messageAssociationAssignedCode; + this.TargetNamespace = targetNamespace; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the message version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageVersion")] + public string MessageVersion {get; set; } + + /// + /// Gets or sets the message release. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageRelease")] + public string MessageRelease {get; set; } + + /// + /// Gets or sets the data element separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dataElementSeparator")] + public int DataElementSeparator {get; set; } + + /// + /// Gets or sets the component separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "componentSeparator")] + public int ComponentSeparator {get; set; } + + /// + /// Gets or sets the segment terminator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminator")] + public int SegmentTerminator {get; set; } + + /// + /// Gets or sets the repetition separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "repetitionSeparator")] + public int RepetitionSeparator {get; set; } + + /// + /// Gets or sets the segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminatorSuffix")] + public SegmentTerminatorSuffix SegmentTerminatorSuffix {get; set; } + + /// + /// Gets or sets the decimal point indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "decimalPointIndicator")] + public EdifactDecimalIndicator DecimalPointIndicator {get; set; } + + /// + /// Gets or sets the release indicator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseIndicator")] + public int ReleaseIndicator {get; set; } + + /// + /// Gets or sets the message association assigned code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageAssociationAssignedCode")] + public string MessageAssociationAssignedCode {get; set; } + + /// + /// Gets or sets the target namespace on which this delimiter settings has to + /// be applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNamespace")] + public string TargetNamespace {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeOverride.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeOverride.cs new file mode 100644 index 000000000000..9b3a57cbedc2 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeOverride.cs @@ -0,0 +1,193 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact envelope override settings. + /// + public partial class EdifactEnvelopeOverride + { + /// + /// Initializes a new instance of the EdifactEnvelopeOverride class. + /// + public EdifactEnvelopeOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactEnvelopeOverride class. + /// + + /// The message id on which this envelope settings has to be applied. + /// + + /// The message version on which this envelope settings has to be applied. + /// + + /// The message release version on which this envelope settings has to be + /// applied. + /// + + /// The message association assigned code. + /// + + /// The target namespace on which this envelope settings has to be applied. + /// + + /// The functional group id. + /// + + /// The sender application qualifier. + /// + + /// The sender application id. + /// + + /// The receiver application qualifier. + /// + + /// The receiver application id. + /// + + /// The controlling agency code. + /// + + /// The group header message version. + /// + + /// The group header message release. + /// + + /// The association assigned code. + /// + + /// The application password. + /// + public EdifactEnvelopeOverride(string messageId = default(string), string messageVersion = default(string), string messageRelease = default(string), string messageAssociationAssignedCode = default(string), string targetNamespace = default(string), string functionalGroupId = default(string), string senderApplicationQualifier = default(string), string senderApplicationId = default(string), string receiverApplicationQualifier = default(string), string receiverApplicationId = default(string), string controllingAgencyCode = default(string), string groupHeaderMessageVersion = default(string), string groupHeaderMessageRelease = default(string), string associationAssignedCode = default(string), string applicationPassword = default(string)) + + { + this.MessageId = messageId; + this.MessageVersion = messageVersion; + this.MessageRelease = messageRelease; + this.MessageAssociationAssignedCode = messageAssociationAssignedCode; + this.TargetNamespace = targetNamespace; + this.FunctionalGroupId = functionalGroupId; + this.SenderApplicationQualifier = senderApplicationQualifier; + this.SenderApplicationId = senderApplicationId; + this.ReceiverApplicationQualifier = receiverApplicationQualifier; + this.ReceiverApplicationId = receiverApplicationId; + this.ControllingAgencyCode = controllingAgencyCode; + this.GroupHeaderMessageVersion = groupHeaderMessageVersion; + this.GroupHeaderMessageRelease = groupHeaderMessageRelease; + this.AssociationAssignedCode = associationAssignedCode; + this.ApplicationPassword = applicationPassword; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the message version on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageVersion")] + public string MessageVersion {get; set; } + + /// + /// Gets or sets the message release version on which this envelope settings + /// has to be applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageRelease")] + public string MessageRelease {get; set; } + + /// + /// Gets or sets the message association assigned code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageAssociationAssignedCode")] + public string MessageAssociationAssignedCode {get; set; } + + /// + /// Gets or sets the target namespace on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNamespace")] + public string TargetNamespace {get; set; } + + /// + /// Gets or sets the functional group id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "functionalGroupId")] + public string FunctionalGroupId {get; set; } + + /// + /// Gets or sets the sender application qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationQualifier")] + public string SenderApplicationQualifier {get; set; } + + /// + /// Gets or sets the sender application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationId")] + public string SenderApplicationId {get; set; } + + /// + /// Gets or sets the receiver application qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverApplicationQualifier")] + public string ReceiverApplicationQualifier {get; set; } + + /// + /// Gets or sets the receiver application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverApplicationId")] + public string ReceiverApplicationId {get; set; } + + /// + /// Gets or sets the controlling agency code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "controllingAgencyCode")] + public string ControllingAgencyCode {get; set; } + + /// + /// Gets or sets the group header message version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderMessageVersion")] + public string GroupHeaderMessageVersion {get; set; } + + /// + /// Gets or sets the group header message release. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderMessageRelease")] + public string GroupHeaderMessageRelease {get; set; } + + /// + /// Gets or sets the association assigned code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "associationAssignedCode")] + public string AssociationAssignedCode {get; set; } + + /// + /// Gets or sets the application password. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationPassword")] + public string ApplicationPassword {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeSettings.cs new file mode 100644 index 000000000000..593cd88f729c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactEnvelopeSettings.cs @@ -0,0 +1,489 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement envelope settings. + /// + public partial class EdifactEnvelopeSettings + { + /// + /// Initializes a new instance of the EdifactEnvelopeSettings class. + /// + public EdifactEnvelopeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactEnvelopeSettings class. + /// + + /// The group association assigned code. + /// + + /// The communication agreement id. + /// + + /// The value indicating whether to apply delimiter string advice. + /// + + /// The value indicating whether to create grouping segments. + /// + + /// The value indicating whether to enable default group headers. + /// + + /// The recipient reference password value. + /// + + /// The recipient reference password qualifier. + /// + + /// The application reference id. + /// + + /// The processing priority code. + /// + + /// The interchange control number lower bound. + /// + + /// The interchange control number upper bound. + /// + + /// The value indicating whether to rollover interchange control number. + /// + + /// The interchange control number prefix. + /// + + /// The interchange control number suffix. + /// + + /// The sender reverse routing address. + /// + + /// The receiver reverse routing address. + /// + + /// The functional group id. + /// + + /// The group controlling agency code. + /// + + /// The group message version. + /// + + /// The group message release. + /// + + /// The group control number lower bound. + /// + + /// The group control number upper bound. + /// + + /// The value indicating whether to rollover group control number. + /// + + /// The group control number prefix. + /// + + /// The group control number suffix. + /// + + /// The group application receiver qualifier. + /// + + /// The group application receiver id. + /// + + /// The group application sender qualifier. + /// + + /// The group application sender id. + /// + + /// The group application password. + /// + + /// The value indicating whether to overwrite existing transaction set control + /// number. + /// + + /// The transaction set control number prefix. + /// + + /// The transaction set control number suffix. + /// + + /// The transaction set control number lower bound. + /// + + /// The transaction set control number upper bound. + /// + + /// The value indicating whether to rollover transaction set control number. + /// + + /// The value indicating whether the message is a test interchange. + /// + + /// The sender internal identification. + /// + + /// The sender internal sub identification. + /// + + /// The receiver internal identification. + /// + + /// The receiver internal sub identification. + /// + public EdifactEnvelopeSettings(bool applyDelimiterStringAdvice, bool createGroupingSegments, bool enableDefaultGroupHeaders, long interchangeControlNumberLowerBound, long interchangeControlNumberUpperBound, bool rolloverInterchangeControlNumber, long groupControlNumberLowerBound, long groupControlNumberUpperBound, bool rolloverGroupControlNumber, bool overwriteExistingTransactionSetControlNumber, long transactionSetControlNumberLowerBound, long transactionSetControlNumberUpperBound, bool rolloverTransactionSetControlNumber, bool isTestInterchange, string groupAssociationAssignedCode = default(string), string communicationAgreementId = default(string), string recipientReferencePasswordValue = default(string), string recipientReferencePasswordQualifier = default(string), string applicationReferenceId = default(string), string processingPriorityCode = default(string), string interchangeControlNumberPrefix = default(string), string interchangeControlNumberSuffix = default(string), string senderReverseRoutingAddress = default(string), string receiverReverseRoutingAddress = default(string), string functionalGroupId = default(string), string groupControllingAgencyCode = default(string), string groupMessageVersion = default(string), string groupMessageRelease = default(string), string groupControlNumberPrefix = default(string), string groupControlNumberSuffix = default(string), string groupApplicationReceiverQualifier = default(string), string groupApplicationReceiverId = default(string), string groupApplicationSenderQualifier = default(string), string groupApplicationSenderId = default(string), string groupApplicationPassword = default(string), string transactionSetControlNumberPrefix = default(string), string transactionSetControlNumberSuffix = default(string), string senderInternalIdentification = default(string), string senderInternalSubIdentification = default(string), string receiverInternalIdentification = default(string), string receiverInternalSubIdentification = default(string)) + + { + this.GroupAssociationAssignedCode = groupAssociationAssignedCode; + this.CommunicationAgreementId = communicationAgreementId; + this.ApplyDelimiterStringAdvice = applyDelimiterStringAdvice; + this.CreateGroupingSegments = createGroupingSegments; + this.EnableDefaultGroupHeaders = enableDefaultGroupHeaders; + this.RecipientReferencePasswordValue = recipientReferencePasswordValue; + this.RecipientReferencePasswordQualifier = recipientReferencePasswordQualifier; + this.ApplicationReferenceId = applicationReferenceId; + this.ProcessingPriorityCode = processingPriorityCode; + this.InterchangeControlNumberLowerBound = interchangeControlNumberLowerBound; + this.InterchangeControlNumberUpperBound = interchangeControlNumberUpperBound; + this.RolloverInterchangeControlNumber = rolloverInterchangeControlNumber; + this.InterchangeControlNumberPrefix = interchangeControlNumberPrefix; + this.InterchangeControlNumberSuffix = interchangeControlNumberSuffix; + this.SenderReverseRoutingAddress = senderReverseRoutingAddress; + this.ReceiverReverseRoutingAddress = receiverReverseRoutingAddress; + this.FunctionalGroupId = functionalGroupId; + this.GroupControllingAgencyCode = groupControllingAgencyCode; + this.GroupMessageVersion = groupMessageVersion; + this.GroupMessageRelease = groupMessageRelease; + this.GroupControlNumberLowerBound = groupControlNumberLowerBound; + this.GroupControlNumberUpperBound = groupControlNumberUpperBound; + this.RolloverGroupControlNumber = rolloverGroupControlNumber; + this.GroupControlNumberPrefix = groupControlNumberPrefix; + this.GroupControlNumberSuffix = groupControlNumberSuffix; + this.GroupApplicationReceiverQualifier = groupApplicationReceiverQualifier; + this.GroupApplicationReceiverId = groupApplicationReceiverId; + this.GroupApplicationSenderQualifier = groupApplicationSenderQualifier; + this.GroupApplicationSenderId = groupApplicationSenderId; + this.GroupApplicationPassword = groupApplicationPassword; + this.OverwriteExistingTransactionSetControlNumber = overwriteExistingTransactionSetControlNumber; + this.TransactionSetControlNumberPrefix = transactionSetControlNumberPrefix; + this.TransactionSetControlNumberSuffix = transactionSetControlNumberSuffix; + this.TransactionSetControlNumberLowerBound = transactionSetControlNumberLowerBound; + this.TransactionSetControlNumberUpperBound = transactionSetControlNumberUpperBound; + this.RolloverTransactionSetControlNumber = rolloverTransactionSetControlNumber; + this.IsTestInterchange = isTestInterchange; + this.SenderInternalIdentification = senderInternalIdentification; + this.SenderInternalSubIdentification = senderInternalSubIdentification; + this.ReceiverInternalIdentification = receiverInternalIdentification; + this.ReceiverInternalSubIdentification = receiverInternalSubIdentification; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the group association assigned code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupAssociationAssignedCode")] + public string GroupAssociationAssignedCode {get; set; } + + /// + /// Gets or sets the communication agreement id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "communicationAgreementId")] + public string CommunicationAgreementId {get; set; } + + /// + /// Gets or sets the value indicating whether to apply delimiter string advice. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "applyDelimiterStringAdvice")] + public bool ApplyDelimiterStringAdvice {get; set; } + + /// + /// Gets or sets the value indicating whether to create grouping segments. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createGroupingSegments")] + public bool CreateGroupingSegments {get; set; } + + /// + /// Gets or sets the value indicating whether to enable default group headers. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableDefaultGroupHeaders")] + public bool EnableDefaultGroupHeaders {get; set; } + + /// + /// Gets or sets the recipient reference password value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "recipientReferencePasswordValue")] + public string RecipientReferencePasswordValue {get; set; } + + /// + /// Gets or sets the recipient reference password qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "recipientReferencePasswordQualifier")] + public string RecipientReferencePasswordQualifier {get; set; } + + /// + /// Gets or sets the application reference id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "applicationReferenceId")] + public string ApplicationReferenceId {get; set; } + + /// + /// Gets or sets the processing priority code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "processingPriorityCode")] + public string ProcessingPriorityCode {get; set; } + + /// + /// Gets or sets the interchange control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberLowerBound")] + public long InterchangeControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the interchange control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberUpperBound")] + public long InterchangeControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover interchange control + /// number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverInterchangeControlNumber")] + public bool RolloverInterchangeControlNumber {get; set; } + + /// + /// Gets or sets the interchange control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberPrefix")] + public string InterchangeControlNumberPrefix {get; set; } + + /// + /// Gets or sets the interchange control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberSuffix")] + public string InterchangeControlNumberSuffix {get; set; } + + /// + /// Gets or sets the sender reverse routing address. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderReverseRoutingAddress")] + public string SenderReverseRoutingAddress {get; set; } + + /// + /// Gets or sets the receiver reverse routing address. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverReverseRoutingAddress")] + public string ReceiverReverseRoutingAddress {get; set; } + + /// + /// Gets or sets the functional group id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "functionalGroupId")] + public string FunctionalGroupId {get; set; } + + /// + /// Gets or sets the group controlling agency code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControllingAgencyCode")] + public string GroupControllingAgencyCode {get; set; } + + /// + /// Gets or sets the group message version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupMessageVersion")] + public string GroupMessageVersion {get; set; } + + /// + /// Gets or sets the group message release. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupMessageRelease")] + public string GroupMessageRelease {get; set; } + + /// + /// Gets or sets the group control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberLowerBound")] + public long GroupControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the group control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberUpperBound")] + public long GroupControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover group control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverGroupControlNumber")] + public bool RolloverGroupControlNumber {get; set; } + + /// + /// Gets or sets the group control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberPrefix")] + public string GroupControlNumberPrefix {get; set; } + + /// + /// Gets or sets the group control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberSuffix")] + public string GroupControlNumberSuffix {get; set; } + + /// + /// Gets or sets the group application receiver qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupApplicationReceiverQualifier")] + public string GroupApplicationReceiverQualifier {get; set; } + + /// + /// Gets or sets the group application receiver id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupApplicationReceiverId")] + public string GroupApplicationReceiverId {get; set; } + + /// + /// Gets or sets the group application sender qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupApplicationSenderQualifier")] + public string GroupApplicationSenderQualifier {get; set; } + + /// + /// Gets or sets the group application sender id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupApplicationSenderId")] + public string GroupApplicationSenderId {get; set; } + + /// + /// Gets or sets the group application password. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupApplicationPassword")] + public string GroupApplicationPassword {get; set; } + + /// + /// Gets or sets the value indicating whether to overwrite existing transaction + /// set control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "overwriteExistingTransactionSetControlNumber")] + public bool OverwriteExistingTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the transaction set control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberPrefix")] + public string TransactionSetControlNumberPrefix {get; set; } + + /// + /// Gets or sets the transaction set control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberSuffix")] + public string TransactionSetControlNumberSuffix {get; set; } + + /// + /// Gets or sets the transaction set control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberLowerBound")] + public long TransactionSetControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the transaction set control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberUpperBound")] + public long TransactionSetControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover transaction set + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverTransactionSetControlNumber")] + public bool RolloverTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether the message is a test + /// interchange. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "isTestInterchange")] + public bool IsTestInterchange {get; set; } + + /// + /// Gets or sets the sender internal identification. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderInternalIdentification")] + public string SenderInternalIdentification {get; set; } + + /// + /// Gets or sets the sender internal sub identification. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderInternalSubIdentification")] + public string SenderInternalSubIdentification {get; set; } + + /// + /// Gets or sets the receiver internal identification. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverInternalIdentification")] + public string ReceiverInternalIdentification {get; set; } + + /// + /// Gets or sets the receiver internal sub identification. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverInternalSubIdentification")] + public string ReceiverInternalSubIdentification {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactFramingSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactFramingSettings.cs new file mode 100644 index 000000000000..01236ebba05b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactFramingSettings.cs @@ -0,0 +1,168 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement framing settings. + /// + public partial class EdifactFramingSettings + { + /// + /// Initializes a new instance of the EdifactFramingSettings class. + /// + public EdifactFramingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactFramingSettings class. + /// + + /// The service code list directory version. + /// + + /// The character encoding. + /// + + /// The protocol version. + /// + + /// The data element separator. + /// + + /// The component separator. + /// + + /// The segment terminator. + /// + + /// The release indicator. + /// + + /// The repetition separator. + /// + + /// The EDIFACT frame setting characterSet. + /// Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', + /// 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', + /// 'KECA' + + /// The EDIFACT frame setting decimal indicator. + /// Possible values include: 'NotSpecified', 'Comma', 'Decimal' + + /// The EDIFACT frame setting segment terminator suffix. + /// Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + public EdifactFramingSettings(int protocolVersion, int dataElementSeparator, int componentSeparator, int segmentTerminator, int releaseIndicator, int repetitionSeparator, string characterSet, EdifactDecimalIndicator decimalPointIndicator, SegmentTerminatorSuffix segmentTerminatorSuffix, string serviceCodeListDirectoryVersion = default(string), string characterEncoding = default(string)) + + { + this.ServiceCodeListDirectoryVersion = serviceCodeListDirectoryVersion; + this.CharacterEncoding = characterEncoding; + this.ProtocolVersion = protocolVersion; + this.DataElementSeparator = dataElementSeparator; + this.ComponentSeparator = componentSeparator; + this.SegmentTerminator = segmentTerminator; + this.ReleaseIndicator = releaseIndicator; + this.RepetitionSeparator = repetitionSeparator; + this.CharacterSet = characterSet; + this.DecimalPointIndicator = decimalPointIndicator; + this.SegmentTerminatorSuffix = segmentTerminatorSuffix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the service code list directory version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceCodeListDirectoryVersion")] + public string ServiceCodeListDirectoryVersion {get; set; } + + /// + /// Gets or sets the character encoding. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "characterEncoding")] + public string CharacterEncoding {get; set; } + + /// + /// Gets or sets the protocol version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolVersion")] + public int ProtocolVersion {get; set; } + + /// + /// Gets or sets the data element separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dataElementSeparator")] + public int DataElementSeparator {get; set; } + + /// + /// Gets or sets the component separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "componentSeparator")] + public int ComponentSeparator {get; set; } + + /// + /// Gets or sets the segment terminator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminator")] + public int SegmentTerminator {get; set; } + + /// + /// Gets or sets the release indicator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseIndicator")] + public int ReleaseIndicator {get; set; } + + /// + /// Gets or sets the repetition separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "repetitionSeparator")] + public int RepetitionSeparator {get; set; } + + /// + /// Gets or sets the EDIFACT frame setting characterSet. Possible values include: 'NotSpecified', 'UNOB', 'UNOA', 'UNOC', 'UNOD', 'UNOE', 'UNOF', 'UNOG', 'UNOH', 'UNOI', 'UNOJ', 'UNOK', 'UNOX', 'UNOY', 'KECA' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "characterSet")] + public string CharacterSet {get; set; } + + /// + /// Gets or sets the EDIFACT frame setting decimal indicator. Possible values include: 'NotSpecified', 'Comma', 'Decimal' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "decimalPointIndicator")] + public EdifactDecimalIndicator DecimalPointIndicator {get; set; } + + /// + /// Gets or sets the EDIFACT frame setting segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminatorSuffix")] + public SegmentTerminatorSuffix SegmentTerminatorSuffix {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.CharacterSet == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "CharacterSet"); + } + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageFilter.cs new file mode 100644 index 000000000000..2b6ae0b76555 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageFilter.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact message filter for odata query. + /// + public partial class EdifactMessageFilter + { + /// + /// Initializes a new instance of the EdifactMessageFilter class. + /// + public EdifactMessageFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactMessageFilter class. + /// + + /// The message filter type. + /// Possible values include: 'NotSpecified', 'Include', 'Exclude' + public EdifactMessageFilter(string messageFilterType) + + { + this.MessageFilterType = messageFilterType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilterType")] + public string MessageFilterType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageFilterType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageFilterType"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageIdentifier.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageIdentifier.cs new file mode 100644 index 000000000000..61815cabedd6 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactMessageIdentifier.cs @@ -0,0 +1,63 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact message identifier. + /// + public partial class EdifactMessageIdentifier + { + /// + /// Initializes a new instance of the EdifactMessageIdentifier class. + /// + public EdifactMessageIdentifier() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactMessageIdentifier class. + /// + + /// The message id on which this envelope settings has to be applied. + /// + public EdifactMessageIdentifier(string messageId) + + { + this.MessageId = messageId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactOneWayAgreement.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactOneWayAgreement.cs new file mode 100644 index 000000000000..ef9512876ea8 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactOneWayAgreement.cs @@ -0,0 +1,101 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact one way agreement. + /// + public partial class EdifactOneWayAgreement + { + /// + /// Initializes a new instance of the EdifactOneWayAgreement class. + /// + public EdifactOneWayAgreement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactOneWayAgreement class. + /// + + /// The sender business identity + /// + + /// The receiver business identity + /// + + /// The EDIFACT protocol settings. + /// + public EdifactOneWayAgreement(BusinessIdentity senderBusinessIdentity, BusinessIdentity receiverBusinessIdentity, EdifactProtocolSettings protocolSettings) + + { + this.SenderBusinessIdentity = senderBusinessIdentity; + this.ReceiverBusinessIdentity = receiverBusinessIdentity; + this.ProtocolSettings = protocolSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sender business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderBusinessIdentity")] + public BusinessIdentity SenderBusinessIdentity {get; set; } + + /// + /// Gets or sets the receiver business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverBusinessIdentity")] + public BusinessIdentity ReceiverBusinessIdentity {get; set; } + + /// + /// Gets or sets the EDIFACT protocol settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolSettings")] + public EdifactProtocolSettings ProtocolSettings {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SenderBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SenderBusinessIdentity"); + } + if (this.ReceiverBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiverBusinessIdentity"); + } + if (this.ProtocolSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProtocolSettings"); + } + if (this.SenderBusinessIdentity != null) + { + this.SenderBusinessIdentity.Validate(); + } + if (this.ReceiverBusinessIdentity != null) + { + this.ReceiverBusinessIdentity.Validate(); + } + if (this.ProtocolSettings != null) + { + this.ProtocolSettings.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProcessingSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProcessingSettings.cs new file mode 100644 index 000000000000..1b1c0b90071f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProcessingSettings.cs @@ -0,0 +1,100 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement protocol settings. + /// + public partial class EdifactProcessingSettings + { + /// + /// Initializes a new instance of the EdifactProcessingSettings class. + /// + public EdifactProcessingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactProcessingSettings class. + /// + + /// The value indicating whether to mask security information. + /// + + /// The value indicating whether to preserve interchange. + /// + + /// The value indicating whether to suspend interchange on error. + /// + + /// The value indicating whether to create empty xml tags for trailing + /// separators. + /// + + /// The value indicating whether to use dot as decimal separator. + /// + public EdifactProcessingSettings(bool maskSecurityInfo, bool preserveInterchange, bool suspendInterchangeOnError, bool createEmptyXmlTagsForTrailingSeparators, bool useDotAsDecimalSeparator) + + { + this.MaskSecurityInfo = maskSecurityInfo; + this.PreserveInterchange = preserveInterchange; + this.SuspendInterchangeOnError = suspendInterchangeOnError; + this.CreateEmptyXmlTagsForTrailingSeparators = createEmptyXmlTagsForTrailingSeparators; + this.UseDotAsDecimalSeparator = useDotAsDecimalSeparator; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to mask security information. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maskSecurityInfo")] + public bool MaskSecurityInfo {get; set; } + + /// + /// Gets or sets the value indicating whether to preserve interchange. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "preserveInterchange")] + public bool PreserveInterchange {get; set; } + + /// + /// Gets or sets the value indicating whether to suspend interchange on error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "suspendInterchangeOnError")] + public bool SuspendInterchangeOnError {get; set; } + + /// + /// Gets or sets the value indicating whether to create empty xml tags for + /// trailing separators. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createEmptyXmlTagsForTrailingSeparators")] + public bool CreateEmptyXmlTagsForTrailingSeparators {get; set; } + + /// + /// Gets or sets the value indicating whether to use dot as decimal separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "useDotAsDecimalSeparator")] + public bool UseDotAsDecimalSeparator {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProtocolSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProtocolSettings.cs new file mode 100644 index 000000000000..7aa5982f17de --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactProtocolSettings.cs @@ -0,0 +1,250 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement protocol settings. + /// + public partial class EdifactProtocolSettings + { + /// + /// Initializes a new instance of the EdifactProtocolSettings class. + /// + public EdifactProtocolSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactProtocolSettings class. + /// + + /// The EDIFACT validation settings. + /// + + /// The EDIFACT framing settings. + /// + + /// The EDIFACT envelope settings. + /// + + /// The EDIFACT acknowledgement settings. + /// + + /// The EDIFACT message filter. + /// + + /// The EDIFACT processing Settings. + /// + + /// The EDIFACT envelope override settings. + /// + + /// The EDIFACT message filter list. + /// + + /// The EDIFACT schema references. + /// + + /// The EDIFACT validation override settings. + /// + + /// The EDIFACT delimiter override settings. + /// + public EdifactProtocolSettings(EdifactValidationSettings validationSettings, EdifactFramingSettings framingSettings, EdifactEnvelopeSettings envelopeSettings, EdifactAcknowledgementSettings acknowledgementSettings, EdifactMessageFilter messageFilter, EdifactProcessingSettings processingSettings, System.Collections.Generic.IList schemaReferences, System.Collections.Generic.IList envelopeOverrides = default(System.Collections.Generic.IList), System.Collections.Generic.IList messageFilterList = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationOverrides = default(System.Collections.Generic.IList), System.Collections.Generic.IList edifactDelimiterOverrides = default(System.Collections.Generic.IList)) + + { + this.ValidationSettings = validationSettings; + this.FramingSettings = framingSettings; + this.EnvelopeSettings = envelopeSettings; + this.AcknowledgementSettings = acknowledgementSettings; + this.MessageFilter = messageFilter; + this.ProcessingSettings = processingSettings; + this.EnvelopeOverrides = envelopeOverrides; + this.MessageFilterList = messageFilterList; + this.SchemaReferences = schemaReferences; + this.ValidationOverrides = validationOverrides; + this.EdifactDelimiterOverrides = edifactDelimiterOverrides; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the EDIFACT validation settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validationSettings")] + public EdifactValidationSettings ValidationSettings {get; set; } + + /// + /// Gets or sets the EDIFACT framing settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "framingSettings")] + public EdifactFramingSettings FramingSettings {get; set; } + + /// + /// Gets or sets the EDIFACT envelope settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "envelopeSettings")] + public EdifactEnvelopeSettings EnvelopeSettings {get; set; } + + /// + /// Gets or sets the EDIFACT acknowledgement settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementSettings")] + public EdifactAcknowledgementSettings AcknowledgementSettings {get; set; } + + /// + /// Gets or sets the EDIFACT message filter. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilter")] + public EdifactMessageFilter MessageFilter {get; set; } + + /// + /// Gets or sets the EDIFACT processing Settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "processingSettings")] + public EdifactProcessingSettings ProcessingSettings {get; set; } + + /// + /// Gets or sets the EDIFACT envelope override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "envelopeOverrides")] + public System.Collections.Generic.IList EnvelopeOverrides {get; set; } + + /// + /// Gets or sets the EDIFACT message filter list. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilterList")] + public System.Collections.Generic.IList MessageFilterList {get; set; } + + /// + /// Gets or sets the EDIFACT schema references. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaReferences")] + public System.Collections.Generic.IList SchemaReferences {get; set; } + + /// + /// Gets or sets the EDIFACT validation override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validationOverrides")] + public System.Collections.Generic.IList ValidationOverrides {get; set; } + + /// + /// Gets or sets the EDIFACT delimiter override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "edifactDelimiterOverrides")] + public System.Collections.Generic.IList EdifactDelimiterOverrides {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ValidationSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ValidationSettings"); + } + if (this.FramingSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FramingSettings"); + } + if (this.EnvelopeSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "EnvelopeSettings"); + } + if (this.AcknowledgementSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AcknowledgementSettings"); + } + if (this.MessageFilter == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageFilter"); + } + if (this.ProcessingSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessingSettings"); + } + if (this.SchemaReferences == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaReferences"); + } + if (this.ValidationSettings != null) + { + this.ValidationSettings.Validate(); + } + if (this.FramingSettings != null) + { + this.FramingSettings.Validate(); + } + if (this.EnvelopeSettings != null) + { + this.EnvelopeSettings.Validate(); + } + if (this.AcknowledgementSettings != null) + { + this.AcknowledgementSettings.Validate(); + } + if (this.MessageFilter != null) + { + this.MessageFilter.Validate(); + } + if (this.ProcessingSettings != null) + { + this.ProcessingSettings.Validate(); + } + + if (this.MessageFilterList != null) + { + foreach (var element in this.MessageFilterList) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.SchemaReferences != null) + { + foreach (var element in this.SchemaReferences) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.ValidationOverrides != null) + { + foreach (var element in this.ValidationOverrides) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.EdifactDelimiterOverrides != null) + { + foreach (var element in this.EdifactDelimiterOverrides) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactSchemaReference.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactSchemaReference.cs new file mode 100644 index 000000000000..e7b6b75a19fa --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactSchemaReference.cs @@ -0,0 +1,140 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact schema reference. + /// + public partial class EdifactSchemaReference + { + /// + /// Initializes a new instance of the EdifactSchemaReference class. + /// + public EdifactSchemaReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactSchemaReference class. + /// + + /// The message id. + /// + + /// The message version. + /// + + /// The message release version. + /// + + /// The sender application id. + /// + + /// The sender application qualifier. + /// + + /// The association assigned code. + /// + + /// The schema name. + /// + public EdifactSchemaReference(string messageId, string messageVersion, string messageRelease, string schemaName, string senderApplicationId = default(string), string senderApplicationQualifier = default(string), string associationAssignedCode = default(string)) + + { + this.MessageId = messageId; + this.MessageVersion = messageVersion; + this.MessageRelease = messageRelease; + this.SenderApplicationId = senderApplicationId; + this.SenderApplicationQualifier = senderApplicationQualifier; + this.AssociationAssignedCode = associationAssignedCode; + this.SchemaName = schemaName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the message version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageVersion")] + public string MessageVersion {get; set; } + + /// + /// Gets or sets the message release version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageRelease")] + public string MessageRelease {get; set; } + + /// + /// Gets or sets the sender application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationId")] + public string SenderApplicationId {get; set; } + + /// + /// Gets or sets the sender application qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationQualifier")] + public string SenderApplicationQualifier {get; set; } + + /// + /// Gets or sets the association assigned code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "associationAssignedCode")] + public string AssociationAssignedCode {get; set; } + + /// + /// Gets or sets the schema name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaName")] + public string SchemaName {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + if (this.MessageVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageVersion"); + } + if (this.MessageRelease == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageRelease"); + } + if (this.SchemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaName"); + } + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationOverride.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationOverride.cs new file mode 100644 index 000000000000..b0b5a925a8b1 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationOverride.cs @@ -0,0 +1,133 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact validation override settings. + /// + public partial class EdifactValidationOverride + { + /// + /// Initializes a new instance of the EdifactValidationOverride class. + /// + public EdifactValidationOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactValidationOverride class. + /// + + /// The message id on which the validation settings has to be applied. + /// + + /// The value indicating whether to validate character Set. + /// + + /// The value indicating whether to validate EDI types. + /// + + /// The value indicating whether to validate XSD types. + /// + + /// The value indicating whether to allow leading and trailing spaces and + /// zeroes. + /// + + /// The trailing separator policy. + /// Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + /// 'Mandatory' + + /// The value indicating whether to trim leading and trailing spaces and + /// zeroes. + /// + public EdifactValidationOverride(string messageId, bool enforceCharacterSet, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, string trailingSeparatorPolicy, bool trimLeadingAndTrailingSpacesAndZeroes) + + { + this.MessageId = messageId; + this.EnforceCharacterSet = enforceCharacterSet; + this.ValidateEdiTypes = validateEdiTypes; + this.ValidateXsdTypes = validateXsdTypes; + this.AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; + this.TrailingSeparatorPolicy = trailingSeparatorPolicy; + this.TrimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id on which the validation settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the value indicating whether to validate character Set. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enforceCharacterSet")] + public bool EnforceCharacterSet {get; set; } + + /// + /// Gets or sets the value indicating whether to validate EDI types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateEDITypes")] + public bool ValidateEdiTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to validate XSD types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateXSDTypes")] + public bool ValidateXsdTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to allow leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "allowLeadingAndTrailingSpacesAndZeroes")] + public bool AllowLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trailingSeparatorPolicy")] + public string TrailingSeparatorPolicy {get; set; } + + /// + /// Gets or sets the value indicating whether to trim leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trimLeadingAndTrailingSpacesAndZeroes")] + public bool TrimLeadingAndTrailingSpacesAndZeroes {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + if (this.TrailingSeparatorPolicy == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TrailingSeparatorPolicy"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationSettings.cs new file mode 100644 index 000000000000..6040b7ba24ce --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EdifactValidationSettings.cs @@ -0,0 +1,163 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The Edifact agreement validation settings. + /// + public partial class EdifactValidationSettings + { + /// + /// Initializes a new instance of the EdifactValidationSettings class. + /// + public EdifactValidationSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EdifactValidationSettings class. + /// + + /// The value indicating whether to validate character set in the message. + /// + + /// The value indicating whether to check for duplicate interchange control + /// number. + /// + + /// The validity period of interchange control number. + /// + + /// The value indicating whether to check for duplicate group control number. + /// + + /// The value indicating whether to check for duplicate transaction set control + /// number. + /// + + /// The value indicating whether to Whether to validate EDI types. + /// + + /// The value indicating whether to Whether to validate XSD types. + /// + + /// The value indicating whether to allow leading and trailing spaces and + /// zeroes. + /// + + /// The value indicating whether to trim leading and trailing spaces and + /// zeroes. + /// + + /// The trailing separator policy. + /// Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + /// 'Mandatory' + public EdifactValidationSettings(bool validateCharacterSet, bool checkDuplicateInterchangeControlNumber, int interchangeControlNumberValidityDays, bool checkDuplicateGroupControlNumber, bool checkDuplicateTransactionSetControlNumber, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, bool trimLeadingAndTrailingSpacesAndZeroes, string trailingSeparatorPolicy) + + { + this.ValidateCharacterSet = validateCharacterSet; + this.CheckDuplicateInterchangeControlNumber = checkDuplicateInterchangeControlNumber; + this.InterchangeControlNumberValidityDays = interchangeControlNumberValidityDays; + this.CheckDuplicateGroupControlNumber = checkDuplicateGroupControlNumber; + this.CheckDuplicateTransactionSetControlNumber = checkDuplicateTransactionSetControlNumber; + this.ValidateEdiTypes = validateEdiTypes; + this.ValidateXsdTypes = validateXsdTypes; + this.AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; + this.TrimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; + this.TrailingSeparatorPolicy = trailingSeparatorPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to validate character set in the + /// message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateCharacterSet")] + public bool ValidateCharacterSet {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate + /// interchange control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateInterchangeControlNumber")] + public bool CheckDuplicateInterchangeControlNumber {get; set; } + + /// + /// Gets or sets the validity period of interchange control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberValidityDays")] + public int InterchangeControlNumberValidityDays {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate group + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateGroupControlNumber")] + public bool CheckDuplicateGroupControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate + /// transaction set control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateTransactionSetControlNumber")] + public bool CheckDuplicateTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether to Whether to validate EDI types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateEDITypes")] + public bool ValidateEdiTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to Whether to validate XSD types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateXSDTypes")] + public bool ValidateXsdTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to allow leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "allowLeadingAndTrailingSpacesAndZeroes")] + public bool AllowLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the value indicating whether to trim leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trimLeadingAndTrailingSpacesAndZeroes")] + public bool TrimLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trailingSeparatorPolicy")] + public string TrailingSeparatorPolicy {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.TrailingSeparatorPolicy == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TrailingSeparatorPolicy"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EncryptionAlgorithm.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EncryptionAlgorithm.cs new file mode 100644 index 000000000000..756daaf23428 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EncryptionAlgorithm.cs @@ -0,0 +1,24 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for EncryptionAlgorithm. + /// + + + public static class EncryptionAlgorithm + { + public const string NotSpecified = "NotSpecified"; + public const string None = "None"; + public const string DES3 = "DES3"; + public const string RC2 = "RC2"; + public const string AES128 = "AES128"; + public const string AES192 = "AES192"; + public const string AES256 = "AES256"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorInfo.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorInfo.cs new file mode 100644 index 000000000000..6dc2888c0c8c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorInfo.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The error info. + /// + public partial class ErrorInfo + { + /// + /// Initializes a new instance of the ErrorInfo class. + /// + public ErrorInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorInfo class. + /// + + /// The error code. + /// + public ErrorInfo(string code) + + { + this.Code = code; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the error code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Code == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Code"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorProperties.cs new file mode 100644 index 000000000000..7031f0e1872e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorProperties.cs @@ -0,0 +1,59 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// Error properties indicate why the Logic service was not able to process the + /// incoming request. The reason is provided in the error message. + /// + public partial class ErrorProperties + { + /// + /// Initializes a new instance of the ErrorProperties class. + /// + public ErrorProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorProperties class. + /// + + /// Error code. + /// + + /// Error message indicating why the operation failed. + /// + public ErrorProperties(string code = default(string), string message = default(string)) + + { + this.Code = code; + this.Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets error code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } + + /// + /// Gets or sets error message indicating why the operation failed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponse.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..0560c0511bc5 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponse.cs @@ -0,0 +1,49 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// Error response indicates Logic service is not able to process the incoming + /// request. The error property contains the error details. + /// + public partial class ErrorResponse + { + /// + /// Initializes a new instance of the ErrorResponse class. + /// + public ErrorResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + + /// The error properties. + /// + public ErrorResponse(ErrorProperties error = default(ErrorProperties)) + + { + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the error properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorProperties Error {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponseException.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponseException.cs new file mode 100644 index 000000000000..1af295e3380f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ErrorResponseException.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Exception thrown for an invalid response with ErrorResponse information. + /// + public partial class ErrorResponseException : Microsoft.Rest.RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public Microsoft.Rest.HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public Microsoft.Rest.HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public ErrorResponse Body { get; set; } + + /// + /// Initializes a new instance of the ErrorResponseException class. + /// + public ErrorResponseException() + { + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// The exception message. + public ErrorResponseException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the ErrorResponse class. + /// + /// The exception message. + /// Inner exception. + public ErrorResponseException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EventLevel.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EventLevel.cs new file mode 100644 index 000000000000..8844dbbb5c87 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/EventLevel.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for EventLevel. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum EventLevel + { + [System.Runtime.Serialization.EnumMember(Value = "LogAlways")] + LogAlways, + [System.Runtime.Serialization.EnumMember(Value = "Critical")] + Critical, + [System.Runtime.Serialization.EnumMember(Value = "Error")] + Error, + [System.Runtime.Serialization.EnumMember(Value = "Warning")] + Warning, + [System.Runtime.Serialization.EnumMember(Value = "Informational")] + Informational, + [System.Runtime.Serialization.EnumMember(Value = "Verbose")] + Verbose + } + internal static class EventLevelEnumExtension + { + internal static string ToSerializedValue(this EventLevel? value) + { + return value == null ? null : ((EventLevel)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this EventLevel value) + { + switch( value ) + { + case EventLevel.LogAlways: + return "LogAlways"; + case EventLevel.Critical: + return "Critical"; + case EventLevel.Error: + return "Error"; + case EventLevel.Warning: + return "Warning"; + case EventLevel.Informational: + return "Informational"; + case EventLevel.Verbose: + return "Verbose"; + } + return null; + } + internal static EventLevel? ParseEventLevel(this string value) + { + switch( value ) + { + case "LogAlways": + return EventLevel.LogAlways; + case "Critical": + return EventLevel.Critical; + case "Error": + return EventLevel.Error; + case "Warning": + return EventLevel.Warning; + case "Informational": + return EventLevel.Informational; + case "Verbose": + return EventLevel.Verbose; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Expression.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Expression.cs new file mode 100644 index 000000000000..7448fa06a8e8 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Expression.cs @@ -0,0 +1,100 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class Expression + { + /// + /// Initializes a new instance of the Expression class. + /// + public Expression() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Expression class. + /// + + /// + /// + + /// Anything + /// + + /// + /// + + /// The azure resource error info. + /// + public Expression(string text = default(string), object value = default(object), System.Collections.Generic.IList subexpressions = default(System.Collections.Generic.IList), AzureResourceErrorInfo error = default(AzureResourceErrorInfo)) + + { + this.Text = text; + this.Value = value; + this.Subexpressions = subexpressions; + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "text")] + public string Text {get; set; } + + /// + /// Gets or sets anything + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public object Value {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "subexpressions")] + public System.Collections.Generic.IList Subexpressions {get; set; } + + /// + /// Gets or sets the azure resource error info. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public AzureResourceErrorInfo Error {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + if (this.Subexpressions != null) + { + foreach (var element in this.Subexpressions) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.Error != null) + { + this.Error.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ExpressionRoot.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ExpressionRoot.cs new file mode 100644 index 000000000000..9a10d23b30b0 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ExpressionRoot.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class ExpressionRoot : Expression + { + /// + /// Initializes a new instance of the ExpressionRoot class. + /// + public ExpressionRoot() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressionRoot class. + /// + + /// + /// + + /// Anything + /// + + /// + /// + + /// The azure resource error info. + /// + + /// The path. + /// + public ExpressionRoot(string text = default(string), object value = default(object), System.Collections.Generic.IList subexpressions = default(System.Collections.Generic.IList), AzureResourceErrorInfo error = default(AzureResourceErrorInfo), string path = default(string)) + + : base(text, value, subexpressions, error) + { + this.Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the path. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "path")] + public string Path {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GenerateUpgradedDefinitionParameters.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GenerateUpgradedDefinitionParameters.cs new file mode 100644 index 000000000000..aefc8f3ca08c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GenerateUpgradedDefinitionParameters.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The parameters to generate upgraded definition. + /// + public partial class GenerateUpgradedDefinitionParameters + { + /// + /// Initializes a new instance of the GenerateUpgradedDefinitionParameters class. + /// + public GenerateUpgradedDefinitionParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GenerateUpgradedDefinitionParameters class. + /// + + /// The target schema version. + /// + public GenerateUpgradedDefinitionParameters(string targetSchemaVersion = default(string)) + + { + this.TargetSchemaVersion = targetSchemaVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the target schema version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetSchemaVersion")] + public string TargetSchemaVersion {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GetCallbackUrlParameters.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GetCallbackUrlParameters.cs new file mode 100644 index 000000000000..58dde554b56f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/GetCallbackUrlParameters.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The callback url parameters. + /// + public partial class GetCallbackUrlParameters + { + /// + /// Initializes a new instance of the GetCallbackUrlParameters class. + /// + public GetCallbackUrlParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GetCallbackUrlParameters class. + /// + + /// The expiry time. + /// + + /// The key type. + /// Possible values include: 'NotSpecified', 'Primary', 'Secondary' + public GetCallbackUrlParameters(System.DateTime? notAfter = default(System.DateTime?), string keyType = default(string)) + + { + this.NotAfter = notAfter; + this.KeyType = keyType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the expiry time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "notAfter")] + public System.DateTime? NotAfter {get; set; } + + /// + /// Gets or sets the key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyType")] + public string KeyType {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/HashingAlgorithm.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/HashingAlgorithm.cs new file mode 100644 index 000000000000..d7f40bc090ca --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/HashingAlgorithm.cs @@ -0,0 +1,24 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for HashingAlgorithm. + /// + + + public static class HashingAlgorithm + { + public const string NotSpecified = "NotSpecified"; + public const string None = "None"; + public const string MD5 = "MD5"; + public const string SHA1 = "SHA1"; + public const string SHA2256 = "SHA2256"; + public const string SHA2384 = "SHA2384"; + public const string SHA2512 = "SHA2512"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccount.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccount.cs new file mode 100644 index 000000000000..277e93465c95 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccount.cs @@ -0,0 +1,89 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccount : Resource + { + /// + /// Initializes a new instance of the IntegrationAccount class. + /// + public IntegrationAccount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccount class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The integration account properties. + /// + + /// The sku. + /// + public IntegrationAccount(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), object properties = default(object), IntegrationAccountSku sku = default(IntegrationAccountSku)) + + : base(id, name, type, location, tags) + { + this.Properties = properties; + this.Sku = sku; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the integration account properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public object Properties {get; set; } + + /// + /// Gets or sets the sku. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public IntegrationAccountSku Sku {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.Sku != null) + { + this.Sku.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreement.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreement.cs new file mode 100644 index 000000000000..5148a4eb4812 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreement.cs @@ -0,0 +1,194 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account agreement. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountAgreement : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountAgreement class. + /// + public IntegrationAccountAgreement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountAgreement class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The agreement type. + /// Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The integration account partner that is set as host partner for this + /// agreement. + /// + + /// The integration account partner that is set as guest partner for this + /// agreement. + /// + + /// The business identity of the host partner. + /// + + /// The business identity of the guest partner. + /// + + /// The agreement content. + /// + public IntegrationAccountAgreement(AgreementType agreementType, string hostPartner, string guestPartner, BusinessIdentity hostIdentity, BusinessIdentity guestIdentity, AgreementContent content, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + : base(id, name, type, location, tags) + { + this.AgreementType = agreementType; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.HostPartner = hostPartner; + this.GuestPartner = guestPartner; + this.HostIdentity = hostIdentity; + this.GuestIdentity = guestIdentity; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the agreement type. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.agreementType")] + public AgreementType AgreementType {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the integration account partner that is set as host partner + /// for this agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.hostPartner")] + public string HostPartner {get; set; } + + /// + /// Gets or sets the integration account partner that is set as guest partner + /// for this agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.guestPartner")] + public string GuestPartner {get; set; } + + /// + /// Gets or sets the business identity of the host partner. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.hostIdentity")] + public BusinessIdentity HostIdentity {get; set; } + + /// + /// Gets or sets the business identity of the guest partner. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.guestIdentity")] + public BusinessIdentity GuestIdentity {get; set; } + + /// + /// Gets or sets the agreement content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.content")] + public AgreementContent Content {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.HostPartner == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "HostPartner"); + } + if (this.GuestPartner == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GuestPartner"); + } + if (this.HostIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "HostIdentity"); + } + if (this.GuestIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GuestIdentity"); + } + if (this.Content == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Content"); + } + + + + + if (this.HostIdentity != null) + { + this.HostIdentity.Validate(); + } + if (this.GuestIdentity != null) + { + this.GuestIdentity.Validate(); + } + if (this.Content != null) + { + this.Content.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementFilter.cs new file mode 100644 index 000000000000..aa138429a95e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementFilter.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account agreement filter for odata query. + /// + public partial class IntegrationAccountAgreementFilter + { + /// + /// Initializes a new instance of the IntegrationAccountAgreementFilter class. + /// + public IntegrationAccountAgreementFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountAgreementFilter class. + /// + + /// The agreement type of integration account agreement. + /// Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + public IntegrationAccountAgreementFilter(AgreementType agreementType) + + { + this.AgreementType = agreementType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the agreement type of integration account agreement. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "agreementType")] + public AgreementType AgreementType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementProperties.cs new file mode 100644 index 000000000000..641c9a033607 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountAgreementProperties.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account agreement properties. + /// + public partial class IntegrationAccountAgreementProperties + { + /// + /// Initializes a new instance of the IntegrationAccountAgreementProperties class. + /// + public IntegrationAccountAgreementProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountAgreementProperties class. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The agreement type. + /// Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + + /// The integration account partner that is set as host partner for this + /// agreement. + /// + + /// The integration account partner that is set as guest partner for this + /// agreement. + /// + + /// The business identity of the host partner. + /// + + /// The business identity of the guest partner. + /// + + /// The agreement content. + /// + public IntegrationAccountAgreementProperties(AgreementType agreementType, string hostPartner, string guestPartner, BusinessIdentity hostIdentity, BusinessIdentity guestIdentity, AgreementContent content, System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.AgreementType = agreementType; + this.HostPartner = hostPartner; + this.GuestPartner = guestPartner; + this.HostIdentity = hostIdentity; + this.GuestIdentity = guestIdentity; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the agreement type. Possible values include: 'NotSpecified', 'AS2', 'X12', 'Edifact' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "agreementType")] + public AgreementType AgreementType {get; set; } + + /// + /// Gets or sets the integration account partner that is set as host partner + /// for this agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "hostPartner")] + public string HostPartner {get; set; } + + /// + /// Gets or sets the integration account partner that is set as guest partner + /// for this agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "guestPartner")] + public string GuestPartner {get; set; } + + /// + /// Gets or sets the business identity of the host partner. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "hostIdentity")] + public BusinessIdentity HostIdentity {get; set; } + + /// + /// Gets or sets the business identity of the guest partner. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "guestIdentity")] + public BusinessIdentity GuestIdentity {get; set; } + + /// + /// Gets or sets the agreement content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public AgreementContent Content {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.HostPartner == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "HostPartner"); + } + if (this.GuestPartner == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GuestPartner"); + } + if (this.HostIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "HostIdentity"); + } + if (this.GuestIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GuestIdentity"); + } + if (this.Content == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Content"); + } + + + + + if (this.HostIdentity != null) + { + this.HostIdentity.Validate(); + } + if (this.GuestIdentity != null) + { + this.GuestIdentity.Validate(); + } + if (this.Content != null) + { + this.Content.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificate.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificate.cs new file mode 100644 index 000000000000..11aaa6ee5dc4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificate.cs @@ -0,0 +1,120 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account certificate. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountCertificate : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountCertificate class. + /// + public IntegrationAccountCertificate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountCertificate class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The key details in the key vault. + /// + + /// The public certificate. + /// + public IntegrationAccountCertificate(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), KeyVaultKeyReference key = default(KeyVaultKeyReference), string publicCertificate = default(string)) + + : base(id, name, type, location, tags) + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Key = key; + this.PublicCertificate = publicCertificate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the key details in the key vault. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.key")] + public KeyVaultKeyReference Key {get; set; } + + /// + /// Gets or sets the public certificate. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.publicCertificate")] + public string PublicCertificate {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.Key != null) + { + this.Key.Validate(); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificateProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificateProperties.cs new file mode 100644 index 000000000000..26e44b1c1bcc --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountCertificateProperties.cs @@ -0,0 +1,103 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account certificate properties. + /// + public partial class IntegrationAccountCertificateProperties + { + /// + /// Initializes a new instance of the IntegrationAccountCertificateProperties class. + /// + public IntegrationAccountCertificateProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountCertificateProperties class. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The key details in the key vault. + /// + + /// The public certificate. + /// + public IntegrationAccountCertificateProperties(System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), KeyVaultKeyReference key = default(KeyVaultKeyReference), string publicCertificate = default(string)) + + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Key = key; + this.PublicCertificate = publicCertificate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the key details in the key vault. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "key")] + public KeyVaultKeyReference Key {get; set; } + + /// + /// Gets or sets the public certificate. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "publicCertificate")] + public string PublicCertificate {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.Key != null) + { + this.Key.Validate(); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMap.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMap.cs new file mode 100644 index 000000000000..abf88d31f709 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMap.cs @@ -0,0 +1,155 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account map. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountMap : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountMap class. + /// + public IntegrationAccountMap() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountMap class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The map type. + /// Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + /// 'Liquid' + + /// The content link. + /// + + /// The parameters schema of integration account map. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The content. + /// + + /// The content type. + /// + + /// The metadata. + /// + public IntegrationAccountMap(string mapType, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), ContentLink contentLink = default(ContentLink), IntegrationAccountMapPropertiesParametersSchema parametersSchema = default(IntegrationAccountMapPropertiesParametersSchema), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string content = default(string), string contentType = default(string), object metadata = default(object)) + + : base(id, name, type, location, tags) + { + this.MapType = mapType; + this.ContentLink = contentLink; + this.ParametersSchema = parametersSchema; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Content = content; + this.ContentType = contentType; + this.Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the map type. Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.mapType")] + public string MapType {get; set; } + + /// + /// Gets the content link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.contentLink")] + public ContentLink ContentLink {get; private set; } + + /// + /// Gets or sets the parameters schema of integration account map. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.parametersSchema")] + public IntegrationAccountMapPropertiesParametersSchema ParametersSchema {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.content")] + public string Content {get; set; } + + /// + /// Gets or sets the content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.contentType")] + public string ContentType {get; set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MapType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MapType"); + } + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapFilter.cs new file mode 100644 index 000000000000..8568a01713e3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapFilter.cs @@ -0,0 +1,63 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account map filter for odata query. + /// + public partial class IntegrationAccountMapFilter + { + /// + /// Initializes a new instance of the IntegrationAccountMapFilter class. + /// + public IntegrationAccountMapFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountMapFilter class. + /// + + /// The map type of integration account map. + /// Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + /// 'Liquid' + public IntegrationAccountMapFilter(string mapType) + + { + this.MapType = mapType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the map type of integration account map. Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mapType")] + public string MapType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MapType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MapType"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapProperties.cs new file mode 100644 index 000000000000..6fcc9012f3c7 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapProperties.cs @@ -0,0 +1,138 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account map. + /// + public partial class IntegrationAccountMapProperties + { + /// + /// Initializes a new instance of the IntegrationAccountMapProperties class. + /// + public IntegrationAccountMapProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountMapProperties class. + /// + + /// The map type. + /// Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', + /// 'Liquid' + + /// The parameters schema of integration account map. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The content. + /// + + /// The content type. + /// + + /// The content link. + /// + + /// The metadata. + /// + public IntegrationAccountMapProperties(string mapType, IntegrationAccountMapPropertiesParametersSchema parametersSchema = default(IntegrationAccountMapPropertiesParametersSchema), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string content = default(string), string contentType = default(string), ContentLink contentLink = default(ContentLink), object metadata = default(object)) + + { + this.MapType = mapType; + this.ParametersSchema = parametersSchema; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Content = content; + this.ContentType = contentType; + this.ContentLink = contentLink; + this.Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the map type. Possible values include: 'NotSpecified', 'Xslt', 'Xslt20', 'Xslt30', 'Liquid' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "mapType")] + public string MapType {get; set; } + + /// + /// Gets or sets the parameters schema of integration account map. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parametersSchema")] + public IntegrationAccountMapPropertiesParametersSchema ParametersSchema {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public string Content {get; set; } + + /// + /// Gets or sets the content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentType")] + public string ContentType {get; set; } + + /// + /// Gets the content link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentLink")] + public ContentLink ContentLink {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MapType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MapType"); + } + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.cs new file mode 100644 index 000000000000..162c778f8ccb --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountMapPropertiesParametersSchema.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The parameters schema of integration account map. + /// + public partial class IntegrationAccountMapPropertiesParametersSchema + { + /// + /// Initializes a new instance of the IntegrationAccountMapPropertiesParametersSchema class. + /// + public IntegrationAccountMapPropertiesParametersSchema() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountMapPropertiesParametersSchema class. + /// + + /// The reference name. + /// + public IntegrationAccountMapPropertiesParametersSchema(string refProperty = default(string)) + + { + this.RefProperty = refProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the reference name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "ref")] + public string RefProperty {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartner.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartner.cs new file mode 100644 index 000000000000..17e0259ee234 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartner.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account partner. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountPartner : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountPartner class. + /// + public IntegrationAccountPartner() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountPartner class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The partner type. + /// Possible values include: 'NotSpecified', 'B2B' + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The partner content. + /// + public IntegrationAccountPartner(string partnerType, PartnerContent content, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + : base(id, name, type, location, tags) + { + this.PartnerType = partnerType; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the partner type. Possible values include: 'NotSpecified', 'B2B' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.partnerType")] + public string PartnerType {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the partner content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.content")] + public PartnerContent Content {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.PartnerType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PartnerType"); + } + if (this.Content == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Content"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerFilter.cs new file mode 100644 index 000000000000..bde90c277850 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerFilter.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account partner filter for odata query. + /// + public partial class IntegrationAccountPartnerFilter + { + /// + /// Initializes a new instance of the IntegrationAccountPartnerFilter class. + /// + public IntegrationAccountPartnerFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountPartnerFilter class. + /// + + /// The partner type of integration account partner. + /// Possible values include: 'NotSpecified', 'B2B' + public IntegrationAccountPartnerFilter(string partnerType) + + { + this.PartnerType = partnerType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the partner type of integration account partner. Possible values include: 'NotSpecified', 'B2B' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "partnerType")] + public string PartnerType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.PartnerType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PartnerType"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerProperties.cs new file mode 100644 index 000000000000..6f7d584942d1 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountPartnerProperties.cs @@ -0,0 +1,108 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account partner properties. + /// + public partial class IntegrationAccountPartnerProperties + { + /// + /// Initializes a new instance of the IntegrationAccountPartnerProperties class. + /// + public IntegrationAccountPartnerProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountPartnerProperties class. + /// + + /// The partner type. + /// Possible values include: 'NotSpecified', 'B2B' + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The partner content. + /// + public IntegrationAccountPartnerProperties(string partnerType, PartnerContent content, System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object)) + + { + this.PartnerType = partnerType; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the partner type. Possible values include: 'NotSpecified', 'B2B' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "partnerType")] + public string PartnerType {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the partner content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public PartnerContent Content {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.PartnerType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PartnerType"); + } + if (this.Content == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Content"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchema.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchema.cs new file mode 100644 index 000000000000..e79c9e8e6925 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchema.cs @@ -0,0 +1,176 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account schema. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountSchema : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountSchema class. + /// + public IntegrationAccountSchema() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSchema class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The schema type. + /// Possible values include: 'NotSpecified', 'Xml' + + /// The content link. + /// + + /// The target namespace of the schema. + /// + + /// The document name. + /// + + /// The file name. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The content. + /// + + /// The content type. + /// + public IntegrationAccountSchema(string schemaType, string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), ContentLink contentLink = default(ContentLink), string targetNamespace = default(string), string documentName = default(string), string fileName = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), string content = default(string), string contentType = default(string)) + + : base(id, name, type, location, tags) + { + this.SchemaType = schemaType; + this.ContentLink = contentLink; + this.TargetNamespace = targetNamespace; + this.DocumentName = documentName; + this.FileName = fileName; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Content = content; + this.ContentType = contentType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the schema type. Possible values include: 'NotSpecified', 'Xml' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.schemaType")] + public string SchemaType {get; set; } + + /// + /// Gets the content link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.contentLink")] + public ContentLink ContentLink {get; private set; } + + /// + /// Gets or sets the target namespace of the schema. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.targetNamespace")] + public string TargetNamespace {get; set; } + + /// + /// Gets or sets the document name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.documentName")] + public string DocumentName {get; set; } + + /// + /// Gets or sets the file name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.fileName")] + public string FileName {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.content")] + public string Content {get; set; } + + /// + /// Gets or sets the content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.contentType")] + public string ContentType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SchemaType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaType"); + } + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaFilter.cs new file mode 100644 index 000000000000..4c221074ba34 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaFilter.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account schema filter for odata query. + /// + public partial class IntegrationAccountSchemaFilter + { + /// + /// Initializes a new instance of the IntegrationAccountSchemaFilter class. + /// + public IntegrationAccountSchemaFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSchemaFilter class. + /// + + /// The schema type of integration account schema. + /// Possible values include: 'NotSpecified', 'Xml' + public IntegrationAccountSchemaFilter(string schemaType) + + { + this.SchemaType = schemaType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the schema type of integration account schema. Possible values include: 'NotSpecified', 'Xml' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaType")] + public string SchemaType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SchemaType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaType"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaProperties.cs new file mode 100644 index 000000000000..612abf90e521 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSchemaProperties.cs @@ -0,0 +1,159 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account schema properties. + /// + public partial class IntegrationAccountSchemaProperties + { + /// + /// Initializes a new instance of the IntegrationAccountSchemaProperties class. + /// + public IntegrationAccountSchemaProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSchemaProperties class. + /// + + /// The schema type. + /// Possible values include: 'NotSpecified', 'Xml' + + /// The target namespace of the schema. + /// + + /// The document name. + /// + + /// The file name. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The metadata. + /// + + /// The content. + /// + + /// The content type. + /// + + /// The content link. + /// + public IntegrationAccountSchemaProperties(string schemaType, string targetNamespace = default(string), string documentName = default(string), string fileName = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object metadata = default(object), string content = default(string), string contentType = default(string), ContentLink contentLink = default(ContentLink)) + + { + this.SchemaType = schemaType; + this.TargetNamespace = targetNamespace; + this.DocumentName = documentName; + this.FileName = fileName; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Metadata = metadata; + this.Content = content; + this.ContentType = contentType; + this.ContentLink = contentLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the schema type. Possible values include: 'NotSpecified', 'Xml' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaType")] + public string SchemaType {get; set; } + + /// + /// Gets or sets the target namespace of the schema. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNamespace")] + public string TargetNamespace {get; set; } + + /// + /// Gets or sets the document name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "documentName")] + public string DocumentName {get; set; } + + /// + /// Gets or sets the file name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "fileName")] + public string FileName {get; set; } + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public string Content {get; set; } + + /// + /// Gets or sets the content type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentType")] + public string ContentType {get; set; } + + /// + /// Gets the content link. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "contentLink")] + public ContentLink ContentLink {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SchemaType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaType"); + } + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSession.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSession.cs new file mode 100644 index 000000000000..cf1b6597c977 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSession.cs @@ -0,0 +1,85 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account session. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class IntegrationAccountSession : Resource + { + /// + /// Initializes a new instance of the IntegrationAccountSession class. + /// + public IntegrationAccountSession() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSession class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The session content. + /// + public IntegrationAccountSession(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object content = default(object)) + + : base(id, name, type, location, tags) + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the session content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.content")] + public object Content {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionFilter.cs new file mode 100644 index 000000000000..9e94510ee042 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionFilter.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account session filter. + /// + public partial class IntegrationAccountSessionFilter + { + /// + /// Initializes a new instance of the IntegrationAccountSessionFilter class. + /// + public IntegrationAccountSessionFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSessionFilter class. + /// + + /// The changed time of integration account sessions. + /// + public IntegrationAccountSessionFilter(System.DateTime changedTime) + + { + this.ChangedTime = changedTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the changed time of integration account sessions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime ChangedTime {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionProperties.cs new file mode 100644 index 000000000000..1866037dfe47 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSessionProperties.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account session properties. + /// + public partial class IntegrationAccountSessionProperties + { + /// + /// Initializes a new instance of the IntegrationAccountSessionProperties class. + /// + public IntegrationAccountSessionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSessionProperties class. + /// + + /// The created time. + /// + + /// The changed time. + /// + + /// The session content. + /// + public IntegrationAccountSessionProperties(System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), object content = default(object)) + + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the session content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public object Content {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSku.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSku.cs new file mode 100644 index 000000000000..88d0a38d7f39 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSku.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account sku. + /// + public partial class IntegrationAccountSku + { + /// + /// Initializes a new instance of the IntegrationAccountSku class. + /// + public IntegrationAccountSku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationAccountSku class. + /// + + /// The sku name. + /// Possible values include: 'NotSpecified', 'Free', 'Basic', 'Standard' + public IntegrationAccountSku(string name) + + { + this.Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sku name. Possible values include: 'NotSpecified', 'Free', 'Basic', 'Standard' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Name == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSkuName.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSkuName.cs new file mode 100644 index 000000000000..ee3aabc61e4d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/IntegrationAccountSkuName.cs @@ -0,0 +1,21 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for IntegrationAccountSkuName. + /// + + + public static class IntegrationAccountSkuName + { + public const string NotSpecified = "NotSpecified"; + public const string Free = "Free"; + public const string Basic = "Basic"; + public const string Standard = "Standard"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/JsonSchema.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/JsonSchema.cs new file mode 100644 index 000000000000..67ad665ce593 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/JsonSchema.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The JSON schema. + /// + public partial class JsonSchema + { + /// + /// Initializes a new instance of the JsonSchema class. + /// + public JsonSchema() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonSchema class. + /// + + /// The JSON title. + /// + + /// The JSON content. + /// + public JsonSchema(string title = default(string), string content = default(string)) + + { + this.Title = title; + this.Content = content; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the JSON title. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "title")] + public string Title {get; set; } + + /// + /// Gets or sets the JSON content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "content")] + public string Content {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyType.cs new file mode 100644 index 000000000000..263812825bbc --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyType.cs @@ -0,0 +1,20 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for KeyType. + /// + + + public static class KeyType + { + public const string NotSpecified = "NotSpecified"; + public const string Primary = "Primary"; + public const string Secondary = "Secondary"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKey.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKey.cs new file mode 100644 index 000000000000..0cbabc4a719c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKey.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The key vault key. + /// + public partial class KeyVaultKey + { + /// + /// Initializes a new instance of the KeyVaultKey class. + /// + public KeyVaultKey() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultKey class. + /// + + /// The key id. + /// + + /// The key attributes. + /// + public KeyVaultKey(string kid = default(string), KeyVaultKeyAttributes attributes = default(KeyVaultKeyAttributes)) + + { + this.Kid = kid; + this.Attributes = attributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the key id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kid")] + public string Kid {get; set; } + + /// + /// Gets or sets the key attributes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "attributes")] + public KeyVaultKeyAttributes Attributes {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyAttributes.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyAttributes.cs new file mode 100644 index 000000000000..76f62c9827c3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyAttributes.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The key attributes. + /// + public partial class KeyVaultKeyAttributes + { + /// + /// Initializes a new instance of the KeyVaultKeyAttributes class. + /// + public KeyVaultKeyAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultKeyAttributes class. + /// + + /// Whether the key is enabled or not. + /// + + /// When the key was created. + /// + + /// When the key was updated. + /// + public KeyVaultKeyAttributes(bool? enabled = default(bool?), long? created = default(long?), long? updated = default(long?)) + + { + this.Enabled = enabled; + this.Created = created; + this.Updated = updated; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets whether the key is enabled or not. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } + + /// + /// Gets or sets when the key was created. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "created")] + public long? Created {get; set; } + + /// + /// Gets or sets when the key was updated. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "updated")] + public long? Updated {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReference.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReference.cs new file mode 100644 index 000000000000..1b6d30d71aa3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReference.cs @@ -0,0 +1,88 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The reference to the key vault key. + /// + public partial class KeyVaultKeyReference + { + /// + /// Initializes a new instance of the KeyVaultKeyReference class. + /// + public KeyVaultKeyReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultKeyReference class. + /// + + /// The key vault reference. + /// + + /// The private key name in key vault. + /// + + /// The private key version in key vault. + /// + public KeyVaultKeyReference(KeyVaultKeyReferenceKeyVault keyVault, string keyName, string keyVersion = default(string)) + + { + this.KeyVault = keyVault; + this.KeyName = keyName; + this.KeyVersion = keyVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the key vault reference. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVault")] + public KeyVaultKeyReferenceKeyVault KeyVault {get; set; } + + /// + /// Gets or sets the private key name in key vault. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyName")] + public string KeyName {get; set; } + + /// + /// Gets or sets the private key version in key vault. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVersion")] + public string KeyVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.KeyVault == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KeyVault"); + } + if (this.KeyName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KeyName"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReferenceKeyVault.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReferenceKeyVault.cs new file mode 100644 index 000000000000..a1a89fa9559f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultKeyReferenceKeyVault.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The key vault reference. + /// + public partial class KeyVaultKeyReferenceKeyVault + { + /// + /// Initializes a new instance of the KeyVaultKeyReferenceKeyVault class. + /// + public KeyVaultKeyReferenceKeyVault() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultKeyReferenceKeyVault class. + /// + + /// The resource id. + /// + + /// The resource name. + /// + + /// The resource type. + /// + public KeyVaultKeyReferenceKeyVault(string id = default(string), string name = default(string), string type = default(string)) + + { + this.Id = id; + this.Name = name; + this.Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } + + /// + /// Gets the resource name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets the resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultReference.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultReference.cs new file mode 100644 index 000000000000..ccca88e9fa32 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/KeyVaultReference.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The key vault reference. + /// + public partial class KeyVaultReference : ResourceReference + { + /// + /// Initializes a new instance of the KeyVaultReference class. + /// + public KeyVaultReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyVaultReference class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + public KeyVaultReference(string id = default(string), string name = default(string), string type = default(string)) + + : base(id, name, type) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ListKeyVaultKeysDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ListKeyVaultKeysDefinition.cs new file mode 100644 index 000000000000..5c06048e28db --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ListKeyVaultKeysDefinition.cs @@ -0,0 +1,73 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The list key vault keys definition. + /// + public partial class ListKeyVaultKeysDefinition + { + /// + /// Initializes a new instance of the ListKeyVaultKeysDefinition class. + /// + public ListKeyVaultKeysDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ListKeyVaultKeysDefinition class. + /// + + /// The key vault reference. + /// + + /// The skip token. + /// + public ListKeyVaultKeysDefinition(KeyVaultReference keyVault, string skipToken = default(string)) + + { + this.KeyVault = keyVault; + this.SkipToken = skipToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the key vault reference. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVault")] + public KeyVaultReference KeyVault {get; set; } + + /// + /// Gets or sets the skip token. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "skipToken")] + public string SkipToken {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.KeyVault == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KeyVault"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MapType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MapType.cs new file mode 100644 index 000000000000..fbb286af7c42 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MapType.cs @@ -0,0 +1,22 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for MapType. + /// + + + public static class MapType + { + public const string NotSpecified = "NotSpecified"; + public const string Xslt = "Xslt"; + public const string Xslt20 = "Xslt20"; + public const string Xslt30 = "Xslt30"; + public const string Liquid = "Liquid"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MessageFilterType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MessageFilterType.cs new file mode 100644 index 000000000000..a9de77410e95 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/MessageFilterType.cs @@ -0,0 +1,20 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for MessageFilterType. + /// + + + public static class MessageFilterType + { + public const string NotSpecified = "NotSpecified"; + public const string Include = "Include"; + public const string Exclude = "Exclude"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Operation.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Operation.cs new file mode 100644 index 000000000000..07a3de331168 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Operation.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// Logic REST API operation + /// + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Operation class. + /// + + /// Operation name: {provider}/{resource}/{operation} + /// + + /// The object that represents the operation. + /// + public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay)) + + { + this.Name = name; + this.Display = display; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets operation name: {provider}/{resource}/{operation} + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + + /// + /// Gets or sets the object that represents the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "display")] + public OperationDisplay Display {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationDisplay.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..855eeb990dbe --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationDisplay.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The object that represents the operation. + /// + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + + /// Service provider: Microsoft.Logic + /// + + /// Resource on which the operation is performed: Profile, endpoint, etc. + /// + + /// Operation type: Read, write, delete, etc. + /// + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string)) + + { + this.Provider = provider; + this.Resource = resource; + this.Operation = operation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets service provider: Microsoft.Logic + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; set; } + + /// + /// Gets or sets resource on which the operation is performed: Profile, + /// endpoint, etc. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; set; } + + /// + /// Gets or sets operation type: Read, write, delete, etc. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResult.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResult.cs new file mode 100644 index 000000000000..e097c60c1f95 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResult.cs @@ -0,0 +1,139 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The operation result definition. + /// + public partial class OperationResult : OperationResultProperties + { + /// + /// Initializes a new instance of the OperationResult class. + /// + public OperationResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationResult class. + /// + + /// The start time of the workflow scope repetition. + /// + + /// The end time of the workflow scope repetition. + /// + + /// The correlation properties. + /// + + /// The status of the workflow scope repetition. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// The workflow scope repetition code. + /// + + /// Anything + /// + + /// Gets the tracking id. + /// + + /// Gets the inputs. + /// + + /// Gets the link to inputs. + /// + + /// Gets the outputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the tracked properties. + /// + + /// Gets the retry histories. + /// + + /// + /// + public OperationResult(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), RunActionCorrelation correlation = default(RunActionCorrelation), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), object inputs = default(object), ContentLink inputsLink = default(ContentLink), object outputs = default(object), ContentLink outputsLink = default(ContentLink), object trackedProperties = default(object), System.Collections.Generic.IList retryHistory = default(System.Collections.Generic.IList), int? iterationCount = default(int?)) + + : base(startTime, endTime, correlation, status, code, error) + { + this.TrackingId = trackingId; + this.Inputs = inputs; + this.InputsLink = inputsLink; + this.Outputs = outputs; + this.OutputsLink = outputsLink; + this.TrackedProperties = trackedProperties; + this.RetryHistory = retryHistory; + this.IterationCount = iterationCount; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets gets the inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputs")] + public object Inputs {get; private set; } + + /// + /// Gets gets the link to inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public object Outputs {get; private set; } + + /// + /// Gets gets the link to outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets the tracked properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackedProperties")] + public object TrackedProperties {get; private set; } + + /// + /// Gets or sets gets the retry histories. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "retryHistory")] + public System.Collections.Generic.IList RetryHistory {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "iterationCount")] + public int? IterationCount {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResultProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResultProperties.cs new file mode 100644 index 000000000000..1652bbdd09f1 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/OperationResultProperties.cs @@ -0,0 +1,100 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The run operation result properties. + /// + public partial class OperationResultProperties + { + /// + /// Initializes a new instance of the OperationResultProperties class. + /// + public OperationResultProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationResultProperties class. + /// + + /// The start time of the workflow scope repetition. + /// + + /// The end time of the workflow scope repetition. + /// + + /// The correlation properties. + /// + + /// The status of the workflow scope repetition. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// The workflow scope repetition code. + /// + + /// Anything + /// + public OperationResultProperties(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), RunActionCorrelation correlation = default(RunActionCorrelation), string status = default(string), string code = default(string), object error = default(object)) + + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Correlation = correlation; + this.Status = status; + this.Code = code; + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the start time of the workflow scope repetition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } + + /// + /// Gets or sets the end time of the workflow scope repetition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } + + /// + /// Gets or sets the correlation properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlation")] + public RunActionCorrelation Correlation {get; set; } + + /// + /// Gets or sets the status of the workflow scope repetition. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + + /// + /// Gets or sets the workflow scope repetition code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } + + /// + /// Gets or sets anything + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page.cs new file mode 100644 index 000000000000..ba416686004e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage + { + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page1.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page1.cs new file mode 100644 index 000000000000..a03a88022cdc --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page1.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage + { + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("inputs")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page2.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page2.cs new file mode 100644 index 000000000000..cabca66d7f98 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Page2.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [Newtonsoft.Json.JsonObject] + public class Page2 : Microsoft.Rest.Azure.IPage + { + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ParameterType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ParameterType.cs new file mode 100644 index 000000000000..4af2f70dad2e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ParameterType.cs @@ -0,0 +1,26 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for ParameterType. + /// + + + public static class ParameterType + { + public const string NotSpecified = "NotSpecified"; + public const string String = "String"; + public const string SecureString = "SecureString"; + public const string Int = "Int"; + public const string Float = "Float"; + public const string Bool = "Bool"; + public const string Array = "Array"; + public const string Object = "Object"; + public const string SecureObject = "SecureObject"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerContent.cs new file mode 100644 index 000000000000..ffe674125934 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerContent.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The integration account partner content. + /// + public partial class PartnerContent + { + /// + /// Initializes a new instance of the PartnerContent class. + /// + public PartnerContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PartnerContent class. + /// + + /// The B2B partner content. + /// + public PartnerContent(B2BPartnerContent b2B = default(B2BPartnerContent)) + + { + this.B2b = b2B; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the B2B partner content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "b2b")] + public B2BPartnerContent B2b {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerType.cs new file mode 100644 index 000000000000..3d92b8769f3a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/PartnerType.cs @@ -0,0 +1,19 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for PartnerType. + /// + + + public static class PartnerType + { + public const string NotSpecified = "NotSpecified"; + public const string B2B = "B2B"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceFrequency.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceFrequency.cs new file mode 100644 index 000000000000..947b4482dded --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceFrequency.cs @@ -0,0 +1,25 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for RecurrenceFrequency. + /// + + + public static class RecurrenceFrequency + { + public const string NotSpecified = "NotSpecified"; + public const string Second = "Second"; + public const string Minute = "Minute"; + public const string Hour = "Hour"; + public const string Day = "Day"; + public const string Week = "Week"; + public const string Month = "Month"; + public const string Year = "Year"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceSchedule.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceSchedule.cs new file mode 100644 index 000000000000..fd8376af6327 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceSchedule.cs @@ -0,0 +1,88 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The recurrence schedule. + /// + public partial class RecurrenceSchedule + { + /// + /// Initializes a new instance of the RecurrenceSchedule class. + /// + public RecurrenceSchedule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecurrenceSchedule class. + /// + + /// The minutes. + /// + + /// The hours. + /// + + /// The days of the week. + /// + + /// The month days. + /// + + /// The monthly occurrences. + /// + public RecurrenceSchedule(System.Collections.Generic.IList minutes = default(System.Collections.Generic.IList), System.Collections.Generic.IList hours = default(System.Collections.Generic.IList), System.Collections.Generic.IList weekDays = default(System.Collections.Generic.IList), System.Collections.Generic.IList monthDays = default(System.Collections.Generic.IList), System.Collections.Generic.IList monthlyOccurrences = default(System.Collections.Generic.IList)) + + { + this.Minutes = minutes; + this.Hours = hours; + this.WeekDays = weekDays; + this.MonthDays = monthDays; + this.MonthlyOccurrences = monthlyOccurrences; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the minutes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "minutes")] + public System.Collections.Generic.IList Minutes {get; set; } + + /// + /// Gets or sets the hours. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "hours")] + public System.Collections.Generic.IList Hours {get; set; } + + /// + /// Gets or sets the days of the week. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "weekDays")] + public System.Collections.Generic.IList WeekDays {get; set; } + + /// + /// Gets or sets the month days. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "monthDays")] + public System.Collections.Generic.IList MonthDays {get; set; } + + /// + /// Gets or sets the monthly occurrences. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "monthlyOccurrences")] + public System.Collections.Generic.IList MonthlyOccurrences {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceScheduleOccurrence.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceScheduleOccurrence.cs new file mode 100644 index 000000000000..64c18dde673c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RecurrenceScheduleOccurrence.cs @@ -0,0 +1,59 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The recurrence schedule occurrence. + /// + public partial class RecurrenceScheduleOccurrence + { + /// + /// Initializes a new instance of the RecurrenceScheduleOccurrence class. + /// + public RecurrenceScheduleOccurrence() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecurrenceScheduleOccurrence class. + /// + + /// The day of the week. + /// Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', + /// 'Thursday', 'Friday', 'Saturday' + + /// The occurrence. + /// + public RecurrenceScheduleOccurrence(DayOfWeek? day = default(DayOfWeek?), int? occurrence = default(int?)) + + { + this.Day = day; + this.Occurrence = occurrence; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "day")] + public DayOfWeek? Day {get; set; } + + /// + /// Gets or sets the occurrence. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "occurrence")] + public int? Occurrence {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RegenerateActionParameter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RegenerateActionParameter.cs new file mode 100644 index 000000000000..68341509328e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RegenerateActionParameter.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The access key regenerate action content. + /// + public partial class RegenerateActionParameter + { + /// + /// Initializes a new instance of the RegenerateActionParameter class. + /// + public RegenerateActionParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RegenerateActionParameter class. + /// + + /// The key type. + /// Possible values include: 'NotSpecified', 'Primary', 'Secondary' + public RegenerateActionParameter(string keyType = default(string)) + + { + this.KeyType = keyType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "keyType")] + public string KeyType {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RepetitionIndex.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RepetitionIndex.cs new file mode 100644 index 000000000000..100602461c57 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RepetitionIndex.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action repetition index. + /// + public partial class RepetitionIndex + { + /// + /// Initializes a new instance of the RepetitionIndex class. + /// + public RepetitionIndex() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RepetitionIndex class. + /// + + /// The scope. + /// + + /// The index. + /// + public RepetitionIndex(int itemIndex, string scopeName = default(string)) + + { + this.ScopeName = scopeName; + this.ItemIndex = itemIndex; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the scope. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "scopeName")] + public string ScopeName {get; set; } + + /// + /// Gets or sets the index. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "itemIndex")] + public int ItemIndex {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Request.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Request.cs new file mode 100644 index 000000000000..2fe4c99ce1c3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Request.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// A request. + /// + public partial class Request + { + /// + /// Initializes a new instance of the Request class. + /// + public Request() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Request class. + /// + + /// A list of all the headers attached to the request. + /// + + /// The destination for the request. + /// + + /// The HTTP method used for the request. + /// + public Request(object headers = default(object), string uri = default(string), string method = default(string)) + + { + this.Headers = headers; + this.Uri = uri; + this.Method = method; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a list of all the headers attached to the request. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "headers")] + public object Headers {get; set; } + + /// + /// Gets or sets the destination for the request. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "uri")] + public string Uri {get; set; } + + /// + /// Gets or sets the HTTP method used for the request. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "method")] + public string Method {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistory.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistory.cs new file mode 100644 index 000000000000..f4e17e84718c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistory.cs @@ -0,0 +1,64 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The request history. + /// + public partial class RequestHistory : Resource + { + /// + /// Initializes a new instance of the RequestHistory class. + /// + public RequestHistory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RequestHistory class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The request history properties. + /// + public RequestHistory(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), RequestHistoryProperties properties = default(RequestHistoryProperties)) + + : base(id, name, type, location, tags) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the request history properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public RequestHistoryProperties Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistoryProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistoryProperties.cs new file mode 100644 index 000000000000..7001e64bb349 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RequestHistoryProperties.cs @@ -0,0 +1,78 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The request history. + /// + public partial class RequestHistoryProperties + { + /// + /// Initializes a new instance of the RequestHistoryProperties class. + /// + public RequestHistoryProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RequestHistoryProperties class. + /// + + /// The time the request started. + /// + + /// The time the request ended. + /// + + /// The request. + /// + + /// The response. + /// + public RequestHistoryProperties(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), Request request = default(Request), Response response = default(Response)) + + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Request = request; + this.Response = response; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the time the request started. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } + + /// + /// Gets or sets the time the request ended. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } + + /// + /// Gets or sets the request. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "request")] + public Request Request {get; set; } + + /// + /// Gets or sets the response. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "response")] + public Response Response {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Resource.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Resource.cs new file mode 100644 index 000000000000..405e81b612da --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Resource.cs @@ -0,0 +1,88 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The base resource type. + /// + public partial class Resource : Microsoft.Rest.Azure.IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + { + this.Id = id; + this.Name = name; + this.Type = type; + this.Location = location; + this.Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the resource id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } + + /// + /// Gets gets the resource name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets or sets the resource location. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + + /// + /// Gets or sets the resource tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ResourceReference.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ResourceReference.cs new file mode 100644 index 000000000000..db95cbe51a82 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/ResourceReference.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The resource reference. + /// + public partial class ResourceReference + { + /// + /// Initializes a new instance of the ResourceReference class. + /// + public ResourceReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceReference class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + public ResourceReference(string id = default(string), string name = default(string), string type = default(string)) + + { + this.Id = id; + this.Name = name; + this.Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } + + /// + /// Gets gets the resource name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the resource type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Response.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Response.cs new file mode 100644 index 000000000000..d5a2a54db2b5 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Response.cs @@ -0,0 +1,68 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// A response. + /// + public partial class Response + { + /// + /// Initializes a new instance of the Response class. + /// + public Response() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Response class. + /// + + /// A list of all the headers attached to the response. + /// + + /// The status code of the response. + /// + + /// Details on the location of the body content. + /// + public Response(object headers = default(object), int? statusCode = default(int?), ContentLink bodyLink = default(ContentLink)) + + { + this.Headers = headers; + this.StatusCode = statusCode; + this.BodyLink = bodyLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets a list of all the headers attached to the response. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "headers")] + public object Headers {get; set; } + + /// + /// Gets or sets the status code of the response. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "statusCode")] + public int? StatusCode {get; set; } + + /// + /// Gets or sets details on the location of the body content. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "bodyLink")] + public ContentLink BodyLink {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RetryHistory.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RetryHistory.cs new file mode 100644 index 000000000000..4bc32821d243 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RetryHistory.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The retry history. + /// + public partial class RetryHistory + { + /// + /// Initializes a new instance of the RetryHistory class. + /// + public RetryHistory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RetryHistory class. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status code. + /// + + /// Gets the client request Id. + /// + + /// Gets the service request Id. + /// + + /// Gets the error response. + /// + public RetryHistory(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string code = default(string), string clientRequestId = default(string), string serviceRequestId = default(string), ErrorResponse error = default(ErrorResponse)) + + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Code = code; + this.ClientRequestId = clientRequestId; + this.ServiceRequestId = serviceRequestId; + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; set; } + + /// + /// Gets or sets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; set; } + + /// + /// Gets or sets gets the status code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } + + /// + /// Gets or sets gets the client request Id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "clientRequestId")] + public string ClientRequestId {get; set; } + + /// + /// Gets or sets gets the service request Id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceRequestId")] + public string ServiceRequestId {get; set; } + + /// + /// Gets or sets gets the error response. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ErrorResponse Error {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunActionCorrelation.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunActionCorrelation.cs new file mode 100644 index 000000000000..ad8ed2b08729 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunActionCorrelation.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action correlation properties. + /// + public partial class RunActionCorrelation : RunCorrelation + { + /// + /// Initializes a new instance of the RunActionCorrelation class. + /// + public RunActionCorrelation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunActionCorrelation class. + /// + + /// The client tracking identifier. + /// + + /// The client keywords. + /// + + /// The action tracking identifier. + /// + public RunActionCorrelation(string clientTrackingId = default(string), System.Collections.Generic.IList clientKeywords = default(System.Collections.Generic.IList), string actionTrackingId = default(string)) + + : base(clientTrackingId, clientKeywords) + { + this.ActionTrackingId = actionTrackingId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the action tracking identifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "actionTrackingId")] + public string ActionTrackingId {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunCorrelation.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunCorrelation.cs new file mode 100644 index 000000000000..95677c6e380f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/RunCorrelation.cs @@ -0,0 +1,58 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The correlation properties. + /// + public partial class RunCorrelation + { + /// + /// Initializes a new instance of the RunCorrelation class. + /// + public RunCorrelation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunCorrelation class. + /// + + /// The client tracking identifier. + /// + + /// The client keywords. + /// + public RunCorrelation(string clientTrackingId = default(string), System.Collections.Generic.IList clientKeywords = default(System.Collections.Generic.IList)) + + { + this.ClientTrackingId = clientTrackingId; + this.ClientKeywords = clientKeywords; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the client tracking identifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "clientTrackingId")] + public string ClientTrackingId {get; set; } + + /// + /// Gets or sets the client keywords. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "clientKeywords")] + public System.Collections.Generic.IList ClientKeywords {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SchemaType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SchemaType.cs new file mode 100644 index 000000000000..61cbd96e3d45 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SchemaType.cs @@ -0,0 +1,19 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for SchemaType. + /// + + + public static class SchemaType + { + public const string NotSpecified = "NotSpecified"; + public const string Xml = "Xml"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SegmentTerminatorSuffix.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SegmentTerminatorSuffix.cs new file mode 100644 index 000000000000..bd7a27a3e7eb --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SegmentTerminatorSuffix.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for SegmentTerminatorSuffix. + /// + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum SegmentTerminatorSuffix + { + [System.Runtime.Serialization.EnumMember(Value = "NotSpecified")] + NotSpecified, + [System.Runtime.Serialization.EnumMember(Value = "None")] + None, + [System.Runtime.Serialization.EnumMember(Value = "CR")] + CR, + [System.Runtime.Serialization.EnumMember(Value = "LF")] + LF, + [System.Runtime.Serialization.EnumMember(Value = "CRLF")] + Crlf + } + internal static class SegmentTerminatorSuffixEnumExtension + { + internal static string ToSerializedValue(this SegmentTerminatorSuffix? value) + { + return value == null ? null : ((SegmentTerminatorSuffix)value).ToSerializedValue(); + } + internal static string ToSerializedValue(this SegmentTerminatorSuffix value) + { + switch( value ) + { + case SegmentTerminatorSuffix.NotSpecified: + return "NotSpecified"; + case SegmentTerminatorSuffix.None: + return "None"; + case SegmentTerminatorSuffix.CR: + return "CR"; + case SegmentTerminatorSuffix.LF: + return "LF"; + case SegmentTerminatorSuffix.Crlf: + return "CRLF"; + } + return null; + } + internal static SegmentTerminatorSuffix? ParseSegmentTerminatorSuffix(this string value) + { + switch( value ) + { + case "NotSpecified": + return SegmentTerminatorSuffix.NotSpecified; + case "None": + return SegmentTerminatorSuffix.None; + case "CR": + return SegmentTerminatorSuffix.CR; + case "LF": + return SegmentTerminatorSuffix.LF; + case "CRLF": + return SegmentTerminatorSuffix.Crlf; + } + return null; + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SetTriggerStateActionDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SetTriggerStateActionDefinition.cs new file mode 100644 index 000000000000..51e95b318211 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SetTriggerStateActionDefinition.cs @@ -0,0 +1,59 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class SetTriggerStateActionDefinition + { + /// + /// Initializes a new instance of the SetTriggerStateActionDefinition class. + /// + public SetTriggerStateActionDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SetTriggerStateActionDefinition class. + /// + + /// The workflow trigger. + /// + public SetTriggerStateActionDefinition(WorkflowTrigger source) + + { + this.Source = source; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the workflow trigger. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "source")] + public WorkflowTrigger Source {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Source == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Source"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SigningAlgorithm.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SigningAlgorithm.cs new file mode 100644 index 000000000000..fdb134220921 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SigningAlgorithm.cs @@ -0,0 +1,23 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for SigningAlgorithm. + /// + + + public static class SigningAlgorithm + { + public const string NotSpecified = "NotSpecified"; + public const string Default = "Default"; + public const string SHA1 = "SHA1"; + public const string SHA2256 = "SHA2256"; + public const string SHA2384 = "SHA2384"; + public const string SHA2512 = "SHA2512"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Sku.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Sku.cs new file mode 100644 index 000000000000..7c80e2bc8dc4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Sku.cs @@ -0,0 +1,74 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The sku type. + /// + public partial class Sku + { + /// + /// Initializes a new instance of the Sku class. + /// + public Sku() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Sku class. + /// + + /// The name. + /// Possible values include: 'NotSpecified', 'Free', 'Shared', 'Basic', + /// 'Standard', 'Premium' + + /// The reference to plan. + /// + public Sku(string name, ResourceReference plan = default(ResourceReference)) + + { + this.Name = name; + this.Plan = plan; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the name. Possible values include: 'NotSpecified', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } + + /// + /// Gets or sets the reference to plan. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "plan")] + public ResourceReference Plan {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Name == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SkuName.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SkuName.cs new file mode 100644 index 000000000000..f9c63fe64810 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SkuName.cs @@ -0,0 +1,23 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for SkuName. + /// + + + public static class SkuName + { + public const string NotSpecified = "NotSpecified"; + public const string Free = "Free"; + public const string Shared = "Shared"; + public const string Basic = "Basic"; + public const string Standard = "Standard"; + public const string Premium = "Premium"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SubResource.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SubResource.cs new file mode 100644 index 000000000000..733285030e8d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/SubResource.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The sub resource type. + /// + public partial class SubResource : Microsoft.Rest.Azure.IResource + { + /// + /// Initializes a new instance of the SubResource class. + /// + public SubResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubResource class. + /// + + /// The resource id. + /// + public SubResource(string id = default(string)) + + { + this.Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the resource id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackEventsOperationOptions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackEventsOperationOptions.cs new file mode 100644 index 000000000000..18e8b78494b2 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackEventsOperationOptions.cs @@ -0,0 +1,19 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for TrackEventsOperationOptions. + /// + + + public static class TrackEventsOperationOptions + { + public const string None = "None"; + public const string DisableSourceInfoEnrich = "DisableSourceInfoEnrich"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEvent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEvent.cs new file mode 100644 index 000000000000..187d5df00a32 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEvent.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class TrackingEvent + { + /// + /// Initializes a new instance of the TrackingEvent class. + /// + public TrackingEvent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackingEvent class. + /// + + /// The event level. + /// Possible values include: 'LogAlways', 'Critical', 'Error', 'Warning', + /// 'Informational', 'Verbose' + + /// + /// + + /// The tracking record type. + /// Possible values include: 'NotSpecified', 'Custom', 'AS2Message', 'AS2MDN', + /// 'X12Interchange', 'X12FunctionalGroup', 'X12TransactionSet', + /// 'X12InterchangeAcknowledgment', 'X12FunctionalGroupAcknowledgment', + /// 'X12TransactionSetAcknowledgment', 'EdifactInterchange', + /// 'EdifactFunctionalGroup', 'EdifactTransactionSet', + /// 'EdifactInterchangeAcknowledgment', 'EdifactFunctionalGroupAcknowledgment', + /// 'EdifactTransactionSetAcknowledgment' + + /// + /// + public TrackingEvent(EventLevel eventLevel, System.DateTime eventTime, string recordType, TrackingEventErrorInfo error = default(TrackingEventErrorInfo)) + + { + this.EventLevel = eventLevel; + this.EventTime = eventTime; + this.RecordType = recordType; + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the event level. Possible values include: 'LogAlways', 'Critical', 'Error', 'Warning', 'Informational', 'Verbose' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "eventLevel")] + public EventLevel EventLevel {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "eventTime")] + public System.DateTime EventTime {get; set; } + + /// + /// Gets or sets the tracking record type. Possible values include: 'NotSpecified', 'Custom', 'AS2Message', 'AS2MDN', 'X12Interchange', 'X12FunctionalGroup', 'X12TransactionSet', 'X12InterchangeAcknowledgment', 'X12FunctionalGroupAcknowledgment', 'X12TransactionSetAcknowledgment', 'EdifactInterchange', 'EdifactFunctionalGroup', 'EdifactTransactionSet', 'EdifactInterchangeAcknowledgment', 'EdifactFunctionalGroupAcknowledgment', 'EdifactTransactionSetAcknowledgment' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "recordType")] + public string RecordType {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public TrackingEventErrorInfo Error {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.RecordType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "RecordType"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventErrorInfo.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventErrorInfo.cs new file mode 100644 index 000000000000..c3710741ed91 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventErrorInfo.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class TrackingEventErrorInfo + { + /// + /// Initializes a new instance of the TrackingEventErrorInfo class. + /// + public TrackingEventErrorInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackingEventErrorInfo class. + /// + + /// + /// + + /// + /// + public TrackingEventErrorInfo(string message = default(string), string code = default(string)) + + { + this.Message = message; + this.Code = code; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventsDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventsDefinition.cs new file mode 100644 index 000000000000..7dc9effcb5c3 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingEventsDefinition.cs @@ -0,0 +1,94 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + public partial class TrackingEventsDefinition + { + /// + /// Initializes a new instance of the TrackingEventsDefinition class. + /// + public TrackingEventsDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TrackingEventsDefinition class. + /// + + /// + /// + + /// The track events operation options. + /// Possible values include: 'None', 'DisableSourceInfoEnrich' + + /// + /// + public TrackingEventsDefinition(string sourceType, System.Collections.Generic.IList events, string trackEventsOptions = default(string)) + + { + this.SourceType = sourceType; + this.TrackEventsOptions = trackEventsOptions; + this.Events = events; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceType")] + public string SourceType {get; set; } + + /// + /// Gets or sets the track events operation options. Possible values include: 'None', 'DisableSourceInfoEnrich' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackEventsOptions")] + public string TrackEventsOptions {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "events")] + public System.Collections.Generic.IList Events {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SourceType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SourceType"); + } + if (this.Events == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Events"); + } + + + if (this.Events != null) + { + foreach (var element in this.Events) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingRecordType.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingRecordType.cs new file mode 100644 index 000000000000..888a51cea709 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrackingRecordType.cs @@ -0,0 +1,33 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for TrackingRecordType. + /// + + + public static class TrackingRecordType + { + public const string NotSpecified = "NotSpecified"; + public const string Custom = "Custom"; + public const string AS2Message = "AS2Message"; + public const string AS2MDN = "AS2MDN"; + public const string X12Interchange = "X12Interchange"; + public const string X12FunctionalGroup = "X12FunctionalGroup"; + public const string X12TransactionSet = "X12TransactionSet"; + public const string X12InterchangeAcknowledgment = "X12InterchangeAcknowledgment"; + public const string X12FunctionalGroupAcknowledgment = "X12FunctionalGroupAcknowledgment"; + public const string X12TransactionSetAcknowledgment = "X12TransactionSetAcknowledgment"; + public const string EdifactInterchange = "EdifactInterchange"; + public const string EdifactFunctionalGroup = "EdifactFunctionalGroup"; + public const string EdifactTransactionSet = "EdifactTransactionSet"; + public const string EdifactInterchangeAcknowledgment = "EdifactInterchangeAcknowledgment"; + public const string EdifactFunctionalGroupAcknowledgment = "EdifactFunctionalGroupAcknowledgment"; + public const string EdifactTransactionSetAcknowledgment = "EdifactTransactionSetAcknowledgment"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrailingSeparatorPolicy.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrailingSeparatorPolicy.cs new file mode 100644 index 000000000000..583fda548fdf --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/TrailingSeparatorPolicy.cs @@ -0,0 +1,21 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for TrailingSeparatorPolicy. + /// + + + public static class TrailingSeparatorPolicy + { + public const string NotSpecified = "NotSpecified"; + public const string NotAllowed = "NotAllowed"; + public const string Optional = "Optional"; + public const string Mandatory = "Mandatory"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/UsageIndicator.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/UsageIndicator.cs new file mode 100644 index 000000000000..9a6a10e0f747 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/UsageIndicator.cs @@ -0,0 +1,21 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for UsageIndicator. + /// + + + public static class UsageIndicator + { + public const string NotSpecified = "NotSpecified"; + public const string Test = "Test"; + public const string Information = "Information"; + public const string Production = "Production"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Workflow.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Workflow.cs new file mode 100644 index 000000000000..672fe2fecd4c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/Workflow.cs @@ -0,0 +1,182 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow type. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class Workflow : Resource + { + /// + /// Initializes a new instance of the Workflow class. + /// + public Workflow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Workflow class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The sku. + /// + + /// Gets the provisioning state. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + /// 'Unregistering', 'Unregistered', 'Completed' + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// The state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the version. + /// + + /// Gets the access endpoint. + /// + + /// The integration account. + /// + + /// The definition. See [Schema reference for Workflow Definition Language in + /// Azure Logic Apps](https://aka.ms/logic-apps-workflow-definition-language). + /// + + /// The parameters. + /// + public Workflow(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Sku sku = default(Sku), string provisioningState = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string version = default(string), string accessEndpoint = default(string), ResourceReference integrationAccount = default(ResourceReference), object definition = default(object), System.Collections.Generic.IDictionary parameters = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, location, tags) + { + this.Sku = sku; + this.ProvisioningState = provisioningState; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Version = version; + this.AccessEndpoint = accessEndpoint; + this.IntegrationAccount = integrationAccount; + this.Definition = definition; + this.Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sku. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.sku")] + public Sku Sku {get; set; } + + /// + /// Gets gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.state")] + public string State {get; set; } + + /// + /// Gets gets the version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.version")] + public string Version {get; private set; } + + /// + /// Gets gets the access endpoint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.accessEndpoint")] + public string AccessEndpoint {get; private set; } + + /// + /// Gets or sets the integration account. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.integrationAccount")] + public ResourceReference IntegrationAccount {get; set; } + + /// + /// Gets or sets the definition. See [Schema reference for Workflow Definition + /// Language in Azure Logic + /// Apps](https://aka.ms/logic-apps-workflow-definition-language). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.definition")] + public object Definition {get; set; } + + /// + /// Gets or sets the parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.parameters")] + public System.Collections.Generic.IDictionary Parameters {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Sku != null) + { + this.Sku.Validate(); + } + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowFilter.cs new file mode 100644 index 000000000000..fba8d2fd97e2 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowFilter.cs @@ -0,0 +1,49 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow filter. + /// + public partial class WorkflowFilter + { + /// + /// Initializes a new instance of the WorkflowFilter class. + /// + public WorkflowFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowFilter class. + /// + + /// The state of workflows. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + public WorkflowFilter(string state = default(string)) + + { + this.State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the state of workflows. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowOutputParameter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowOutputParameter.cs new file mode 100644 index 000000000000..d91ad7278a2a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowOutputParameter.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow output parameter. + /// + public partial class WorkflowOutputParameter : WorkflowParameter + { + /// + /// Initializes a new instance of the WorkflowOutputParameter class. + /// + public WorkflowOutputParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowOutputParameter class. + /// + + /// The type. + /// Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', + /// 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + + /// The value. + /// + + /// The metadata. + /// + + /// The description. + /// + + /// Gets the error. + /// + public WorkflowOutputParameter(string type = default(string), object value = default(object), object metadata = default(object), string description = default(string), object error = default(object)) + + : base(type, value, metadata, description) + { + this.Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowParameter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowParameter.cs new file mode 100644 index 000000000000..f78239eb8f65 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowParameter.cs @@ -0,0 +1,79 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow parameters. + /// + public partial class WorkflowParameter + { + /// + /// Initializes a new instance of the WorkflowParameter class. + /// + public WorkflowParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowParameter class. + /// + + /// The type. + /// Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', + /// 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + + /// The value. + /// + + /// The metadata. + /// + + /// The description. + /// + public WorkflowParameter(string type = default(string), object value = default(object), object metadata = default(object), string description = default(string)) + + { + this.Type = type; + this.Value = value; + this.Metadata = metadata; + this.Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the type. Possible values include: 'NotSpecified', 'String', 'SecureString', 'Int', 'Float', 'Bool', 'Array', 'Object', 'SecureObject' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } + + /// + /// Gets or sets the value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public object Value {get; set; } + + /// + /// Gets or sets the metadata. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "metadata")] + public object Metadata {get; set; } + + /// + /// Gets or sets the description. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProperties.cs new file mode 100644 index 000000000000..43aedd336fc4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProperties.cs @@ -0,0 +1,165 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow properties. + /// + public partial class WorkflowProperties + { + /// + /// Initializes a new instance of the WorkflowProperties class. + /// + public WorkflowProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowProperties class. + /// + + /// Gets the provisioning state. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + /// 'Unregistering', 'Unregistered', 'Completed' + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// The state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the version. + /// + + /// Gets the access endpoint. + /// + + /// The sku. + /// + + /// The integration account. + /// + + /// The definition. See [Schema reference for Workflow Definition Language in + /// Azure Logic Apps](https://aka.ms/logic-apps-workflow-definition-language). + /// + + /// The parameters. + /// + public WorkflowProperties(string provisioningState = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string version = default(string), string accessEndpoint = default(string), Sku sku = default(Sku), ResourceReference integrationAccount = default(ResourceReference), object definition = default(object), System.Collections.Generic.IDictionary parameters = default(System.Collections.Generic.IDictionary)) + + { + this.ProvisioningState = provisioningState; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Version = version; + this.AccessEndpoint = accessEndpoint; + this.Sku = sku; + this.IntegrationAccount = integrationAccount; + this.Definition = definition; + this.Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + + /// + /// Gets gets the version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } + + /// + /// Gets gets the access endpoint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "accessEndpoint")] + public string AccessEndpoint {get; private set; } + + /// + /// Gets or sets the sku. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } + + /// + /// Gets or sets the integration account. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "integrationAccount")] + public ResourceReference IntegrationAccount {get; set; } + + /// + /// Gets or sets the definition. See [Schema reference for Workflow Definition + /// Language in Azure Logic + /// Apps](https://aka.ms/logic-apps-workflow-definition-language). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "definition")] + public object Definition {get; set; } + + /// + /// Gets or sets the parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] + public System.Collections.Generic.IDictionary Parameters {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + if (this.Sku != null) + { + this.Sku.Validate(); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProvisioningState.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProvisioningState.cs new file mode 100644 index 000000000000..6186f63c06e2 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowProvisioningState.cs @@ -0,0 +1,35 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for WorkflowProvisioningState. + /// + + + public static class WorkflowProvisioningState + { + public const string NotSpecified = "NotSpecified"; + public const string Accepted = "Accepted"; + public const string Running = "Running"; + public const string Ready = "Ready"; + public const string Creating = "Creating"; + public const string Created = "Created"; + public const string Deleting = "Deleting"; + public const string Deleted = "Deleted"; + public const string Canceled = "Canceled"; + public const string Failed = "Failed"; + public const string Succeeded = "Succeeded"; + public const string Moving = "Moving"; + public const string Updating = "Updating"; + public const string Registering = "Registering"; + public const string Registered = "Registered"; + public const string Unregistering = "Unregistering"; + public const string Unregistered = "Unregistered"; + public const string Completed = "Completed"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRun.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRun.cs new file mode 100644 index 000000000000..4970990ad069 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRun.cs @@ -0,0 +1,185 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowRun : SubResource + { + /// + /// Initializes a new instance of the WorkflowRun class. + /// + public WorkflowRun() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRun class. + /// + + /// The resource id. + /// + + /// Gets the workflow run name. + /// + + /// Gets the workflow run type. + /// + + /// The run correlation. + /// + + /// Gets the wait end time. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the correlation id. + /// + + /// Gets the reference to workflow version. + /// + + /// Gets the fired trigger. + /// + + /// Gets the outputs. + /// + + /// Gets the response of the flow run. + /// + public WorkflowRun(string id = default(string), string name = default(string), string type = default(string), Correlation correlation = default(Correlation), System.DateTime? waitEndTime = default(System.DateTime?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string correlationId = default(string), ResourceReference workflow = default(ResourceReference), WorkflowRunTrigger trigger = default(WorkflowRunTrigger), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), WorkflowRunTrigger response = default(WorkflowRunTrigger)) + + : base(id) + { + this.Name = name; + this.Type = type; + this.Correlation = correlation; + this.WaitEndTime = waitEndTime; + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.CorrelationId = correlationId; + this.Workflow = workflow; + this.Trigger = trigger; + this.Outputs = outputs; + this.Response = response; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the workflow run name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the workflow run type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets or sets the run correlation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the wait end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.waitEndTime")] + public System.DateTime? WaitEndTime {get; private set; } + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.error")] + public object Error {get; private set; } + + /// + /// Gets gets the correlation id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.correlationId")] + public string CorrelationId {get; private set; } + + /// + /// Gets gets the reference to workflow version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.workflow")] + public ResourceReference Workflow {get; private set; } + + /// + /// Gets gets the fired trigger. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trigger")] + public WorkflowRunTrigger Trigger {get; private set; } + + /// + /// Gets gets the outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets gets the response of the flow run. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.response")] + public WorkflowRunTrigger Response {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunAction.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunAction.cs new file mode 100644 index 000000000000..e69b19e9e49f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunAction.cs @@ -0,0 +1,175 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowRunAction : SubResource + { + /// + /// Initializes a new instance of the WorkflowRunAction class. + /// + public WorkflowRunAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunAction class. + /// + + /// The resource id. + /// + + /// Gets the workflow run action name. + /// + + /// Gets the workflow run action type. + /// + + /// The correlation properties. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the tracking id. + /// + + /// Gets the link to inputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the tracked properties. + /// + + /// Gets the retry histories. + /// + public WorkflowRunAction(string id = default(string), string name = default(string), string type = default(string), Correlation correlation = default(Correlation), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), ContentLink inputsLink = default(ContentLink), ContentLink outputsLink = default(ContentLink), object trackedProperties = default(object), System.Collections.Generic.IList retryHistory = default(System.Collections.Generic.IList)) + + : base(id) + { + this.Name = name; + this.Type = type; + this.Correlation = correlation; + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.TrackingId = trackingId; + this.InputsLink = inputsLink; + this.OutputsLink = outputsLink; + this.TrackedProperties = trackedProperties; + this.RetryHistory = retryHistory; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the workflow run action name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the workflow run action type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets or sets the correlation properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.error")] + public object Error {get; private set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets gets the link to inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the link to outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets the tracked properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trackedProperties")] + public object TrackedProperties {get; private set; } + + /// + /// Gets or sets gets the retry histories. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.retryHistory")] + public System.Collections.Generic.IList RetryHistory {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionFilter.cs new file mode 100644 index 000000000000..e8be266beeeb --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionFilter.cs @@ -0,0 +1,50 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action filter. + /// + public partial class WorkflowRunActionFilter + { + /// + /// Initializes a new instance of the WorkflowRunActionFilter class. + /// + public WorkflowRunActionFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunActionFilter class. + /// + + /// The status of workflow run action. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + public WorkflowRunActionFilter(string status = default(string)) + + { + this.Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the status of workflow run action. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionProperties.cs new file mode 100644 index 000000000000..edddb6648a9c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionProperties.cs @@ -0,0 +1,150 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action properties. + /// + public partial class WorkflowRunActionProperties + { + /// + /// Initializes a new instance of the WorkflowRunActionProperties class. + /// + public WorkflowRunActionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunActionProperties class. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the tracking id. + /// + + /// The correlation properties. + /// + + /// Gets the link to inputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the tracked properties. + /// + + /// Gets the retry histories. + /// + public WorkflowRunActionProperties(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), Correlation correlation = default(Correlation), ContentLink inputsLink = default(ContentLink), ContentLink outputsLink = default(ContentLink), object trackedProperties = default(object), System.Collections.Generic.IList retryHistory = default(System.Collections.Generic.IList)) + + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.TrackingId = trackingId; + this.Correlation = correlation; + this.InputsLink = inputsLink; + this.OutputsLink = outputsLink; + this.TrackedProperties = trackedProperties; + this.RetryHistory = retryHistory; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; private set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets or sets the correlation properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the link to inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the link to outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets the tracked properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackedProperties")] + public object TrackedProperties {get; private set; } + + /// + /// Gets or sets gets the retry histories. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "retryHistory")] + public System.Collections.Generic.IList RetryHistory {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinition.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinition.cs new file mode 100644 index 000000000000..2fe4daa2ef83 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinition.cs @@ -0,0 +1,207 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action repetition definition. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowRunActionRepetitionDefinition : Resource + { + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionDefinition class. + /// + public WorkflowRunActionRepetitionDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionDefinition class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The start time of the workflow scope repetition. + /// + + /// The end time of the workflow scope repetition. + /// + + /// The correlation properties. + /// + + /// The status of the workflow scope repetition. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// The workflow scope repetition code. + /// + + /// Anything + /// + + /// Gets the tracking id. + /// + + /// Gets the inputs. + /// + + /// Gets the link to inputs. + /// + + /// Gets the outputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the tracked properties. + /// + + /// Gets the retry histories. + /// + + /// + /// + + /// The repetition indexes. + /// + public WorkflowRunActionRepetitionDefinition(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), RunActionCorrelation correlation = default(RunActionCorrelation), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), object inputs = default(object), ContentLink inputsLink = default(ContentLink), object outputs = default(object), ContentLink outputsLink = default(ContentLink), object trackedProperties = default(object), System.Collections.Generic.IList retryHistory = default(System.Collections.Generic.IList), int? iterationCount = default(int?), System.Collections.Generic.IList repetitionIndexes = default(System.Collections.Generic.IList)) + + : base(id, name, type, location, tags) + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Correlation = correlation; + this.Status = status; + this.Code = code; + this.Error = error; + this.TrackingId = trackingId; + this.Inputs = inputs; + this.InputsLink = inputsLink; + this.Outputs = outputs; + this.OutputsLink = outputsLink; + this.TrackedProperties = trackedProperties; + this.RetryHistory = retryHistory; + this.IterationCount = iterationCount; + this.RepetitionIndexes = repetitionIndexes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the start time of the workflow scope repetition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime {get; set; } + + /// + /// Gets or sets the end time of the workflow scope repetition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime {get; set; } + + /// + /// Gets or sets the correlation properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.correlation")] + public RunActionCorrelation Correlation {get; set; } + + /// + /// Gets or sets the status of the workflow scope repetition. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public string Status {get; set; } + + /// + /// Gets or sets the workflow scope repetition code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.code")] + public string Code {get; set; } + + /// + /// Gets or sets anything + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.error")] + public object Error {get; set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets gets the inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.inputs")] + public object Inputs {get; private set; } + + /// + /// Gets gets the link to inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputs")] + public object Outputs {get; private set; } + + /// + /// Gets gets the link to outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets the tracked properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trackedProperties")] + public object TrackedProperties {get; private set; } + + /// + /// Gets or sets gets the retry histories. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.retryHistory")] + public System.Collections.Generic.IList RetryHistory {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.iterationCount")] + public int? IterationCount {get; set; } + + /// + /// Gets or sets the repetition indexes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.repetitionIndexes")] + public System.Collections.Generic.IList RepetitionIndexes {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs new file mode 100644 index 000000000000..d7abe3e99f86 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs @@ -0,0 +1,48 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// A collection of workflow run action repetitions. + /// + public partial class WorkflowRunActionRepetitionDefinitionCollection + { + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionDefinitionCollection class. + /// + public WorkflowRunActionRepetitionDefinitionCollection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionDefinitionCollection class. + /// + + /// + /// + public WorkflowRunActionRepetitionDefinitionCollection(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + + { + this.Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionProperties.cs new file mode 100644 index 000000000000..cc6348d69198 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunActionRepetitionProperties.cs @@ -0,0 +1,93 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run action repetition properties definition. + /// + public partial class WorkflowRunActionRepetitionProperties : OperationResult + { + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionProperties class. + /// + public WorkflowRunActionRepetitionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionProperties class. + /// + + /// The start time of the workflow scope repetition. + /// + + /// The end time of the workflow scope repetition. + /// + + /// The correlation properties. + /// + + /// The status of the workflow scope repetition. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// The workflow scope repetition code. + /// + + /// Anything + /// + + /// Gets the tracking id. + /// + + /// Gets the inputs. + /// + + /// Gets the link to inputs. + /// + + /// Gets the outputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the tracked properties. + /// + + /// Gets the retry histories. + /// + + /// + /// + + /// The repetition indexes. + /// + public WorkflowRunActionRepetitionProperties(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), RunActionCorrelation correlation = default(RunActionCorrelation), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), object inputs = default(object), ContentLink inputsLink = default(ContentLink), object outputs = default(object), ContentLink outputsLink = default(ContentLink), object trackedProperties = default(object), System.Collections.Generic.IList retryHistory = default(System.Collections.Generic.IList), int? iterationCount = default(int?), System.Collections.Generic.IList repetitionIndexes = default(System.Collections.Generic.IList)) + + : base(startTime, endTime, correlation, status, code, error, trackingId, inputs, inputsLink, outputs, outputsLink, trackedProperties, retryHistory, iterationCount) + { + this.RepetitionIndexes = repetitionIndexes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the repetition indexes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "repetitionIndexes")] + public System.Collections.Generic.IList RepetitionIndexes {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunFilter.cs new file mode 100644 index 000000000000..f4b5a0ed09f5 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunFilter.cs @@ -0,0 +1,50 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run filter. + /// + public partial class WorkflowRunFilter + { + /// + /// Initializes a new instance of the WorkflowRunFilter class. + /// + public WorkflowRunFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunFilter class. + /// + + /// The status of workflow run. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + public WorkflowRunFilter(string status = default(string)) + + { + this.Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the status of workflow run. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunProperties.cs new file mode 100644 index 000000000000..ae7660a28700 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunProperties.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run properties. + /// + public partial class WorkflowRunProperties + { + /// + /// Initializes a new instance of the WorkflowRunProperties class. + /// + public WorkflowRunProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunProperties class. + /// + + /// Gets the wait end time. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the correlation id. + /// + + /// The run correlation. + /// + + /// Gets the reference to workflow version. + /// + + /// Gets the fired trigger. + /// + + /// Gets the outputs. + /// + + /// Gets the response of the flow run. + /// + public WorkflowRunProperties(System.DateTime? waitEndTime = default(System.DateTime?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string correlationId = default(string), Correlation correlation = default(Correlation), ResourceReference workflow = default(ResourceReference), WorkflowRunTrigger trigger = default(WorkflowRunTrigger), System.Collections.Generic.IDictionary outputs = default(System.Collections.Generic.IDictionary), WorkflowRunTrigger response = default(WorkflowRunTrigger)) + + { + this.WaitEndTime = waitEndTime; + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.CorrelationId = correlationId; + this.Correlation = correlation; + this.Workflow = workflow; + this.Trigger = trigger; + this.Outputs = outputs; + this.Response = response; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the wait end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "waitEndTime")] + public System.DateTime? WaitEndTime {get; private set; } + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; private set; } + + /// + /// Gets gets the correlation id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlationId")] + public string CorrelationId {get; private set; } + + /// + /// Gets or sets the run correlation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the reference to workflow version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "workflow")] + public ResourceReference Workflow {get; private set; } + + /// + /// Gets gets the fired trigger. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trigger")] + public WorkflowRunTrigger Trigger {get; private set; } + + /// + /// Gets gets the outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public System.Collections.Generic.IDictionary Outputs {get; private set; } + + /// + /// Gets gets the response of the flow run. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "response")] + public WorkflowRunTrigger Response {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunTrigger.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunTrigger.cs new file mode 100644 index 000000000000..6e4ed69db0a1 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowRunTrigger.cs @@ -0,0 +1,180 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow run trigger. + /// + public partial class WorkflowRunTrigger + { + /// + /// Initializes a new instance of the WorkflowRunTrigger class. + /// + public WorkflowRunTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowRunTrigger class. + /// + + /// Gets the name. + /// + + /// Gets the inputs. + /// + + /// Gets the link to inputs. + /// + + /// Gets the outputs. + /// + + /// Gets the link to outputs. + /// + + /// Gets the scheduled time. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the tracking id. + /// + + /// The run correlation. + /// + + /// Gets the code. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the error. + /// + + /// Gets the tracked properties. + /// + public WorkflowRunTrigger(string name = default(string), object inputs = default(object), ContentLink inputsLink = default(ContentLink), object outputs = default(object), ContentLink outputsLink = default(ContentLink), System.DateTime? scheduledTime = default(System.DateTime?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string trackingId = default(string), Correlation correlation = default(Correlation), string code = default(string), string status = default(string), object error = default(object), object trackedProperties = default(object)) + + { + this.Name = name; + this.Inputs = inputs; + this.InputsLink = inputsLink; + this.Outputs = outputs; + this.OutputsLink = outputsLink; + this.ScheduledTime = scheduledTime; + this.StartTime = startTime; + this.EndTime = endTime; + this.TrackingId = trackingId; + this.Correlation = correlation; + this.Code = code; + this.Status = status; + this.Error = error; + this.TrackedProperties = trackedProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputs")] + public object Inputs {get; private set; } + + /// + /// Gets gets the link to inputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputs")] + public object Outputs {get; private set; } + + /// + /// Gets gets the link to outputs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets the scheduled time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "scheduledTime")] + public System.DateTime? ScheduledTime {get; private set; } + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets or sets the run correlation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; private set; } + + /// + /// Gets gets the tracked properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackedProperties")] + public object TrackedProperties {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowState.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowState.cs new file mode 100644 index 000000000000..cb3a1cdcbe62 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowState.cs @@ -0,0 +1,23 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for WorkflowState. + /// + + + public static class WorkflowState + { + public const string NotSpecified = "NotSpecified"; + public const string Completed = "Completed"; + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; + public const string Deleted = "Deleted"; + public const string Suspended = "Suspended"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowStatus.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowStatus.cs new file mode 100644 index 000000000000..d59128374833 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowStatus.cs @@ -0,0 +1,30 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for WorkflowStatus. + /// + + + public static class WorkflowStatus + { + public const string NotSpecified = "NotSpecified"; + public const string Paused = "Paused"; + public const string Running = "Running"; + public const string Waiting = "Waiting"; + public const string Succeeded = "Succeeded"; + public const string Skipped = "Skipped"; + public const string Suspended = "Suspended"; + public const string Cancelled = "Cancelled"; + public const string Failed = "Failed"; + public const string Faulted = "Faulted"; + public const string TimedOut = "TimedOut"; + public const string Aborted = "Aborted"; + public const string Ignored = "Ignored"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTrigger.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTrigger.cs new file mode 100644 index 000000000000..39197a88d72a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTrigger.cs @@ -0,0 +1,159 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowTrigger : SubResource + { + /// + /// Initializes a new instance of the WorkflowTrigger class. + /// + public WorkflowTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTrigger class. + /// + + /// The resource id. + /// + + /// Gets the workflow trigger name. + /// + + /// Gets the workflow trigger type. + /// + + /// Gets the provisioning state. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + /// 'Unregistering', 'Unregistered', 'Completed' + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// Gets the state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the last execution time. + /// + + /// Gets the next execution time. + /// + + /// Gets the workflow trigger recurrence. + /// + + /// Gets the reference to workflow. + /// + public WorkflowTrigger(string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string status = default(string), System.DateTime? lastExecutionTime = default(System.DateTime?), System.DateTime? nextExecutionTime = default(System.DateTime?), WorkflowTriggerRecurrence recurrence = default(WorkflowTriggerRecurrence), ResourceReference workflow = default(ResourceReference)) + + : base(id) + { + this.Name = name; + this.Type = type; + this.ProvisioningState = provisioningState; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Status = status; + this.LastExecutionTime = lastExecutionTime; + this.NextExecutionTime = nextExecutionTime; + this.Recurrence = recurrence; + this.Workflow = workflow; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the workflow trigger name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the workflow trigger type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets gets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.state")] + public string State {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public string Status {get; private set; } + + /// + /// Gets gets the last execution time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.lastExecutionTime")] + public System.DateTime? LastExecutionTime {get; private set; } + + /// + /// Gets gets the next execution time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nextExecutionTime")] + public System.DateTime? NextExecutionTime {get; private set; } + + /// + /// Gets gets the workflow trigger recurrence. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.recurrence")] + public WorkflowTriggerRecurrence Recurrence {get; private set; } + + /// + /// Gets gets the reference to workflow. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.workflow")] + public ResourceReference Workflow {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerCallbackUrl.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerCallbackUrl.cs new file mode 100644 index 000000000000..80167b4a358b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerCallbackUrl.cs @@ -0,0 +1,99 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger callback URL. + /// + public partial class WorkflowTriggerCallbackUrl + { + /// + /// Initializes a new instance of the WorkflowTriggerCallbackUrl class. + /// + public WorkflowTriggerCallbackUrl() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerCallbackUrl class. + /// + + /// Gets the workflow trigger callback URL. + /// + + /// Gets the workflow trigger callback URL HTTP method. + /// + + /// Gets the workflow trigger callback URL base path. + /// + + /// Gets the workflow trigger callback URL relative path. + /// + + /// Gets the workflow trigger callback URL relative path parameters. + /// + + /// Gets the workflow trigger callback URL query parameters. + /// + public WorkflowTriggerCallbackUrl(string value = default(string), string method = default(string), string basePath = default(string), string relativePath = default(string), System.Collections.Generic.IList relativePathParameters = default(System.Collections.Generic.IList), WorkflowTriggerListCallbackUrlQueries queries = default(WorkflowTriggerListCallbackUrlQueries)) + + { + this.Value = value; + this.Method = method; + this.BasePath = basePath; + this.RelativePath = relativePath; + this.RelativePathParameters = relativePathParameters; + this.Queries = queries; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the workflow trigger callback URL. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; private set; } + + /// + /// Gets gets the workflow trigger callback URL HTTP method. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "method")] + public string Method {get; private set; } + + /// + /// Gets gets the workflow trigger callback URL base path. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "basePath")] + public string BasePath {get; private set; } + + /// + /// Gets gets the workflow trigger callback URL relative path. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "relativePath")] + public string RelativePath {get; private set; } + + /// + /// Gets or sets gets the workflow trigger callback URL relative path + /// parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "relativePathParameters")] + public System.Collections.Generic.IList RelativePathParameters {get; set; } + + /// + /// Gets or sets gets the workflow trigger callback URL query parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "queries")] + public WorkflowTriggerListCallbackUrlQueries Queries {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerFilter.cs new file mode 100644 index 000000000000..11dc055b75dd --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerFilter.cs @@ -0,0 +1,49 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger filter. + /// + public partial class WorkflowTriggerFilter + { + /// + /// Initializes a new instance of the WorkflowTriggerFilter class. + /// + public WorkflowTriggerFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerFilter class. + /// + + /// The state of workflow trigger. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + public WorkflowTriggerFilter(string state = default(string)) + + { + this.State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the state of workflow trigger. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistory.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistory.cs new file mode 100644 index 000000000000..2505bea57f31 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistory.cs @@ -0,0 +1,175 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger history. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowTriggerHistory : SubResource + { + /// + /// Initializes a new instance of the WorkflowTriggerHistory class. + /// + public WorkflowTriggerHistory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerHistory class. + /// + + /// The resource id. + /// + + /// Gets the workflow trigger history name. + /// + + /// Gets the workflow trigger history type. + /// + + /// The run correlation. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the tracking id. + /// + + /// Gets the link to input parameters. + /// + + /// Gets the link to output parameters. + /// + + /// Gets a value indicating whether trigger was fired. + /// + + /// Gets the reference to workflow run. + /// + public WorkflowTriggerHistory(string id = default(string), string name = default(string), string type = default(string), Correlation correlation = default(Correlation), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), ContentLink inputsLink = default(ContentLink), ContentLink outputsLink = default(ContentLink), bool? fired = default(bool?), ResourceReference run = default(ResourceReference)) + + : base(id) + { + this.Name = name; + this.Type = type; + this.Correlation = correlation; + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.TrackingId = trackingId; + this.InputsLink = inputsLink; + this.OutputsLink = outputsLink; + this.Fired = fired; + this.Run = run; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the workflow trigger history name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } + + /// + /// Gets gets the workflow trigger history type. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets or sets the run correlation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.error")] + public object Error {get; private set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets gets the link to input parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the link to output parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets a value indicating whether trigger was fired. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.fired")] + public bool? Fired {get; private set; } + + /// + /// Gets gets the reference to workflow run. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.run")] + public ResourceReference Run {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryFilter.cs new file mode 100644 index 000000000000..5e662553f81a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryFilter.cs @@ -0,0 +1,50 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger history filter. + /// + public partial class WorkflowTriggerHistoryFilter + { + /// + /// Initializes a new instance of the WorkflowTriggerHistoryFilter class. + /// + public WorkflowTriggerHistoryFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerHistoryFilter class. + /// + + /// The status of workflow trigger history. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + public WorkflowTriggerHistoryFilter(string status = default(string)) + + { + this.Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the status of workflow trigger history. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryProperties.cs new file mode 100644 index 000000000000..a0f9eeafb881 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerHistoryProperties.cs @@ -0,0 +1,150 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger history properties. + /// + public partial class WorkflowTriggerHistoryProperties + { + /// + /// Initializes a new instance of the WorkflowTriggerHistoryProperties class. + /// + public WorkflowTriggerHistoryProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerHistoryProperties class. + /// + + /// Gets the start time. + /// + + /// Gets the end time. + /// + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the code. + /// + + /// Gets the error. + /// + + /// Gets the tracking id. + /// + + /// The run correlation. + /// + + /// Gets the link to input parameters. + /// + + /// Gets the link to output parameters. + /// + + /// Gets a value indicating whether trigger was fired. + /// + + /// Gets the reference to workflow run. + /// + public WorkflowTriggerHistoryProperties(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string status = default(string), string code = default(string), object error = default(object), string trackingId = default(string), Correlation correlation = default(Correlation), ContentLink inputsLink = default(ContentLink), ContentLink outputsLink = default(ContentLink), bool? fired = default(bool?), ResourceReference run = default(ResourceReference)) + + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Status = status; + this.Code = code; + this.Error = error; + this.TrackingId = trackingId; + this.Correlation = correlation; + this.InputsLink = inputsLink; + this.OutputsLink = outputsLink; + this.Fired = fired; + this.Run = run; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime {get; private set; } + + /// + /// Gets gets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } + + /// + /// Gets gets the code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; private set; } + + /// + /// Gets gets the error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public object Error {get; private set; } + + /// + /// Gets gets the tracking id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trackingId")] + public string TrackingId {get; private set; } + + /// + /// Gets or sets the run correlation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "correlation")] + public Correlation Correlation {get; set; } + + /// + /// Gets gets the link to input parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "inputsLink")] + public ContentLink InputsLink {get; private set; } + + /// + /// Gets gets the link to output parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "outputsLink")] + public ContentLink OutputsLink {get; private set; } + + /// + /// Gets gets a value indicating whether trigger was fired. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "fired")] + public bool? Fired {get; private set; } + + /// + /// Gets gets the reference to workflow run. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "run")] + public ResourceReference Run {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerListCallbackUrlQueries.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerListCallbackUrlQueries.cs new file mode 100644 index 000000000000..57b977ba4d0a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerListCallbackUrlQueries.cs @@ -0,0 +1,88 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// Gets the workflow trigger callback URL query parameters. + /// + public partial class WorkflowTriggerListCallbackUrlQueries + { + /// + /// Initializes a new instance of the WorkflowTriggerListCallbackUrlQueries class. + /// + public WorkflowTriggerListCallbackUrlQueries() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerListCallbackUrlQueries class. + /// + + /// The api version. + /// + + /// The SAS permissions. + /// + + /// The SAS version. + /// + + /// The SAS signature. + /// + + /// The SAS timestamp. + /// + public WorkflowTriggerListCallbackUrlQueries(string apiVersion = default(string), string sp = default(string), string sv = default(string), string sig = default(string), string se = default(string)) + + { + this.ApiVersion = apiVersion; + this.Sp = sp; + this.Sv = sv; + this.Sig = sig; + this.Se = se; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the api version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "api-version")] + public string ApiVersion {get; set; } + + /// + /// Gets or sets the SAS permissions. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sp")] + public string Sp {get; set; } + + /// + /// Gets or sets the SAS version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sv")] + public string Sv {get; set; } + + /// + /// Gets or sets the SAS signature. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sig")] + public string Sig {get; set; } + + /// + /// Gets or sets the SAS timestamp. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "se")] + public string Se {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProperties.cs new file mode 100644 index 000000000000..dac5854bbc98 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProperties.cs @@ -0,0 +1,134 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger properties. + /// + public partial class WorkflowTriggerProperties + { + /// + /// Initializes a new instance of the WorkflowTriggerProperties class. + /// + public WorkflowTriggerProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerProperties class. + /// + + /// Gets the provisioning state. + /// Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', + /// 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', + /// 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', + /// 'Unregistering', 'Unregistered', 'Completed' + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// Gets the state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the status. + /// Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', + /// 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', + /// 'TimedOut', 'Aborted', 'Ignored' + + /// Gets the last execution time. + /// + + /// Gets the next execution time. + /// + + /// Gets the workflow trigger recurrence. + /// + + /// Gets the reference to workflow. + /// + public WorkflowTriggerProperties(string provisioningState = default(string), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string status = default(string), System.DateTime? lastExecutionTime = default(System.DateTime?), System.DateTime? nextExecutionTime = default(System.DateTime?), WorkflowTriggerRecurrence recurrence = default(WorkflowTriggerRecurrence), ResourceReference workflow = default(ResourceReference)) + + { + this.ProvisioningState = provisioningState; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Status = status; + this.LastExecutionTime = lastExecutionTime; + this.NextExecutionTime = nextExecutionTime; + this.Recurrence = recurrence; + this.Workflow = workflow; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the provisioning state. Possible values include: 'NotSpecified', 'Accepted', 'Running', 'Ready', 'Creating', 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Moving', 'Updating', 'Registering', 'Registered', 'Unregistering', 'Unregistered', 'Completed' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets gets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; private set; } + + /// + /// Gets gets the status. Possible values include: 'NotSpecified', 'Paused', 'Running', 'Waiting', 'Succeeded', 'Skipped', 'Suspended', 'Cancelled', 'Failed', 'Faulted', 'TimedOut', 'Aborted', 'Ignored' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; private set; } + + /// + /// Gets gets the last execution time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "lastExecutionTime")] + public System.DateTime? LastExecutionTime {get; private set; } + + /// + /// Gets gets the next execution time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nextExecutionTime")] + public System.DateTime? NextExecutionTime {get; private set; } + + /// + /// Gets gets the workflow trigger recurrence. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "recurrence")] + public WorkflowTriggerRecurrence Recurrence {get; private set; } + + /// + /// Gets gets the reference to workflow. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "workflow")] + public ResourceReference Workflow {get; private set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProvisioningState.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProvisioningState.cs new file mode 100644 index 000000000000..84efe494d44c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerProvisioningState.cs @@ -0,0 +1,35 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for WorkflowTriggerProvisioningState. + /// + + + public static class WorkflowTriggerProvisioningState + { + public const string NotSpecified = "NotSpecified"; + public const string Accepted = "Accepted"; + public const string Running = "Running"; + public const string Ready = "Ready"; + public const string Creating = "Creating"; + public const string Created = "Created"; + public const string Deleting = "Deleting"; + public const string Deleted = "Deleted"; + public const string Canceled = "Canceled"; + public const string Failed = "Failed"; + public const string Succeeded = "Succeeded"; + public const string Moving = "Moving"; + public const string Updating = "Updating"; + public const string Registering = "Registering"; + public const string Registered = "Registered"; + public const string Unregistering = "Unregistering"; + public const string Unregistered = "Unregistered"; + public const string Completed = "Completed"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerRecurrence.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerRecurrence.cs new file mode 100644 index 000000000000..76e4e2b99036 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowTriggerRecurrence.cs @@ -0,0 +1,99 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow trigger recurrence. + /// + public partial class WorkflowTriggerRecurrence + { + /// + /// Initializes a new instance of the WorkflowTriggerRecurrence class. + /// + public WorkflowTriggerRecurrence() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowTriggerRecurrence class. + /// + + /// The frequency. + /// Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', + /// 'Week', 'Month', 'Year' + + /// The interval. + /// + + /// The start time. + /// + + /// The end time. + /// + + /// The time zone. + /// + + /// The recurrence schedule. + /// + public WorkflowTriggerRecurrence(string frequency = default(string), int? interval = default(int?), string startTime = default(string), string endTime = default(string), string timeZone = default(string), RecurrenceSchedule schedule = default(RecurrenceSchedule)) + + { + this.Frequency = frequency; + this.Interval = interval; + this.StartTime = startTime; + this.EndTime = endTime; + this.TimeZone = timeZone; + this.Schedule = schedule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the frequency. Possible values include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "frequency")] + public string Frequency {get; set; } + + /// + /// Gets or sets the interval. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interval")] + public int? Interval {get; set; } + + /// + /// Gets or sets the start time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startTime")] + public string StartTime {get; set; } + + /// + /// Gets or sets the end time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "endTime")] + public string EndTime {get; set; } + + /// + /// Gets or sets the time zone. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timeZone")] + public string TimeZone {get; set; } + + /// + /// Gets or sets the recurrence schedule. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schedule")] + public RecurrenceSchedule Schedule {get; set; } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersion.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersion.cs new file mode 100644 index 000000000000..af6cf96453e0 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersion.cs @@ -0,0 +1,165 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow version. + /// + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class WorkflowVersion : Resource + { + /// + /// Initializes a new instance of the WorkflowVersion class. + /// + public WorkflowVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowVersion class. + /// + + /// The resource id. + /// + + /// Gets the resource name. + /// + + /// Gets the resource type. + /// + + /// The resource location. + /// + + /// The resource tags. + /// + + /// The sku. + /// + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// The state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the version. + /// + + /// Gets the access endpoint. + /// + + /// The integration account. + /// + + /// The definition. + /// + + /// The parameters. + /// + public WorkflowVersion(string id = default(string), string name = default(string), string type = default(string), string location = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), Sku sku = default(Sku), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string version = default(string), string accessEndpoint = default(string), ResourceReference integrationAccount = default(ResourceReference), object definition = default(object), System.Collections.Generic.IDictionary parameters = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, location, tags) + { + this.Sku = sku; + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Version = version; + this.AccessEndpoint = accessEndpoint; + this.IntegrationAccount = integrationAccount; + this.Definition = definition; + this.Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sku. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.sku")] + public Sku Sku {get; set; } + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.state")] + public string State {get; set; } + + /// + /// Gets gets the version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.version")] + public string Version {get; private set; } + + /// + /// Gets gets the access endpoint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.accessEndpoint")] + public string AccessEndpoint {get; private set; } + + /// + /// Gets or sets the integration account. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.integrationAccount")] + public ResourceReference IntegrationAccount {get; set; } + + /// + /// Gets or sets the definition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.definition")] + public object Definition {get; set; } + + /// + /// Gets or sets the parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.parameters")] + public System.Collections.Generic.IDictionary Parameters {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Sku != null) + { + this.Sku.Validate(); + } + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersionProperties.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersionProperties.cs new file mode 100644 index 000000000000..f8064bd84d6f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/WorkflowVersionProperties.cs @@ -0,0 +1,148 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The workflow version properties. + /// + public partial class WorkflowVersionProperties + { + /// + /// Initializes a new instance of the WorkflowVersionProperties class. + /// + public WorkflowVersionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WorkflowVersionProperties class. + /// + + /// Gets the created time. + /// + + /// Gets the changed time. + /// + + /// The state. + /// Possible values include: 'NotSpecified', 'Completed', 'Enabled', + /// 'Disabled', 'Deleted', 'Suspended' + + /// Gets the version. + /// + + /// Gets the access endpoint. + /// + + /// The sku. + /// + + /// The integration account. + /// + + /// The definition. + /// + + /// The parameters. + /// + public WorkflowVersionProperties(System.DateTime? createdTime = default(System.DateTime?), System.DateTime? changedTime = default(System.DateTime?), string state = default(string), string version = default(string), string accessEndpoint = default(string), Sku sku = default(Sku), ResourceReference integrationAccount = default(ResourceReference), object definition = default(object), System.Collections.Generic.IDictionary parameters = default(System.Collections.Generic.IDictionary)) + + { + this.CreatedTime = createdTime; + this.ChangedTime = changedTime; + this.State = state; + this.Version = version; + this.AccessEndpoint = accessEndpoint; + this.Sku = sku; + this.IntegrationAccount = integrationAccount; + this.Definition = definition; + this.Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets gets the created time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createdTime")] + public System.DateTime? CreatedTime {get; private set; } + + /// + /// Gets gets the changed time. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "changedTime")] + public System.DateTime? ChangedTime {get; private set; } + + /// + /// Gets or sets the state. Possible values include: 'NotSpecified', 'Completed', 'Enabled', 'Disabled', 'Deleted', 'Suspended' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "state")] + public string State {get; set; } + + /// + /// Gets gets the version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; private set; } + + /// + /// Gets gets the access endpoint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "accessEndpoint")] + public string AccessEndpoint {get; private set; } + + /// + /// Gets or sets the sku. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public Sku Sku {get; set; } + + /// + /// Gets or sets the integration account. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "integrationAccount")] + public ResourceReference IntegrationAccount {get; set; } + + /// + /// Gets or sets the definition. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "definition")] + public object Definition {get; set; } + + /// + /// Gets or sets the parameters. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "parameters")] + public System.Collections.Generic.IDictionary Parameters {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + if (this.Sku != null) + { + this.Sku.Validate(); + } + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AcknowledgementSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AcknowledgementSettings.cs new file mode 100644 index 000000000000..232b5a6d0771 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AcknowledgementSettings.cs @@ -0,0 +1,210 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement acknowledgement settings. + /// + public partial class X12AcknowledgementSettings + { + /// + /// Initializes a new instance of the X12AcknowledgementSettings class. + /// + public X12AcknowledgementSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12AcknowledgementSettings class. + /// + + /// The value indicating whether technical acknowledgement is needed. + /// + + /// The value indicating whether to batch the technical acknowledgements. + /// + + /// The value indicating whether functional acknowledgement is needed. + /// + + /// The functional acknowledgement version. + /// + + /// The value indicating whether to batch functional acknowledgements. + /// + + /// The value indicating whether implementation acknowledgement is needed. + /// + + /// The implementation acknowledgement version. + /// + + /// The value indicating whether to batch implementation acknowledgements. + /// + + /// The value indicating whether a loop is needed for valid messages. + /// + + /// The value indicating whether to send synchronous acknowledgement. + /// + + /// The acknowledgement control number prefix. + /// + + /// The acknowledgement control number suffix. + /// + + /// The acknowledgement control number lower bound. + /// + + /// The acknowledgement control number upper bound. + /// + + /// The value indicating whether to rollover acknowledgement control number. + /// + public X12AcknowledgementSettings(bool needTechnicalAcknowledgement, bool batchTechnicalAcknowledgements, bool needFunctionalAcknowledgement, bool batchFunctionalAcknowledgements, bool needImplementationAcknowledgement, bool batchImplementationAcknowledgements, bool needLoopForValidMessages, bool sendSynchronousAcknowledgement, int acknowledgementControlNumberLowerBound, int acknowledgementControlNumberUpperBound, bool rolloverAcknowledgementControlNumber, string functionalAcknowledgementVersion = default(string), string implementationAcknowledgementVersion = default(string), string acknowledgementControlNumberPrefix = default(string), string acknowledgementControlNumberSuffix = default(string)) + + { + this.NeedTechnicalAcknowledgement = needTechnicalAcknowledgement; + this.BatchTechnicalAcknowledgements = batchTechnicalAcknowledgements; + this.NeedFunctionalAcknowledgement = needFunctionalAcknowledgement; + this.FunctionalAcknowledgementVersion = functionalAcknowledgementVersion; + this.BatchFunctionalAcknowledgements = batchFunctionalAcknowledgements; + this.NeedImplementationAcknowledgement = needImplementationAcknowledgement; + this.ImplementationAcknowledgementVersion = implementationAcknowledgementVersion; + this.BatchImplementationAcknowledgements = batchImplementationAcknowledgements; + this.NeedLoopForValidMessages = needLoopForValidMessages; + this.SendSynchronousAcknowledgement = sendSynchronousAcknowledgement; + this.AcknowledgementControlNumberPrefix = acknowledgementControlNumberPrefix; + this.AcknowledgementControlNumberSuffix = acknowledgementControlNumberSuffix; + this.AcknowledgementControlNumberLowerBound = acknowledgementControlNumberLowerBound; + this.AcknowledgementControlNumberUpperBound = acknowledgementControlNumberUpperBound; + this.RolloverAcknowledgementControlNumber = rolloverAcknowledgementControlNumber; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether technical acknowledgement is + /// needed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needTechnicalAcknowledgement")] + public bool NeedTechnicalAcknowledgement {get; set; } + + /// + /// Gets or sets the value indicating whether to batch the technical + /// acknowledgements. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchTechnicalAcknowledgements")] + public bool BatchTechnicalAcknowledgements {get; set; } + + /// + /// Gets or sets the value indicating whether functional acknowledgement is + /// needed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needFunctionalAcknowledgement")] + public bool NeedFunctionalAcknowledgement {get; set; } + + /// + /// Gets or sets the functional acknowledgement version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "functionalAcknowledgementVersion")] + public string FunctionalAcknowledgementVersion {get; set; } + + /// + /// Gets or sets the value indicating whether to batch functional + /// acknowledgements. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchFunctionalAcknowledgements")] + public bool BatchFunctionalAcknowledgements {get; set; } + + /// + /// Gets or sets the value indicating whether implementation acknowledgement is + /// needed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needImplementationAcknowledgement")] + public bool NeedImplementationAcknowledgement {get; set; } + + /// + /// Gets or sets the implementation acknowledgement version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "implementationAcknowledgementVersion")] + public string ImplementationAcknowledgementVersion {get; set; } + + /// + /// Gets or sets the value indicating whether to batch implementation + /// acknowledgements. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "batchImplementationAcknowledgements")] + public bool BatchImplementationAcknowledgements {get; set; } + + /// + /// Gets or sets the value indicating whether a loop is needed for valid + /// messages. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "needLoopForValidMessages")] + public bool NeedLoopForValidMessages {get; set; } + + /// + /// Gets or sets the value indicating whether to send synchronous + /// acknowledgement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendSynchronousAcknowledgement")] + public bool SendSynchronousAcknowledgement {get; set; } + + /// + /// Gets or sets the acknowledgement control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberPrefix")] + public string AcknowledgementControlNumberPrefix {get; set; } + + /// + /// Gets or sets the acknowledgement control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberSuffix")] + public string AcknowledgementControlNumberSuffix {get; set; } + + /// + /// Gets or sets the acknowledgement control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberLowerBound")] + public int AcknowledgementControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the acknowledgement control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementControlNumberUpperBound")] + public int AcknowledgementControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover acknowledgement + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverAcknowledgementControlNumber")] + public bool RolloverAcknowledgementControlNumber {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AgreementContent.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AgreementContent.cs new file mode 100644 index 000000000000..401b714af8df --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12AgreementContent.cs @@ -0,0 +1,83 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement content. + /// + public partial class X12AgreementContent + { + /// + /// Initializes a new instance of the X12AgreementContent class. + /// + public X12AgreementContent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12AgreementContent class. + /// + + /// The X12 one-way receive agreement. + /// + + /// The X12 one-way send agreement. + /// + public X12AgreementContent(X12OneWayAgreement receiveAgreement, X12OneWayAgreement sendAgreement) + + { + this.ReceiveAgreement = receiveAgreement; + this.SendAgreement = sendAgreement; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the X12 one-way receive agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiveAgreement")] + public X12OneWayAgreement ReceiveAgreement {get; set; } + + /// + /// Gets or sets the X12 one-way send agreement. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sendAgreement")] + public X12OneWayAgreement SendAgreement {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ReceiveAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiveAgreement"); + } + if (this.SendAgreement == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SendAgreement"); + } + if (this.ReceiveAgreement != null) + { + this.ReceiveAgreement.Validate(); + } + if (this.SendAgreement != null) + { + this.SendAgreement.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12CharacterSet.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12CharacterSet.cs new file mode 100644 index 000000000000..360e15401d9c --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12CharacterSet.cs @@ -0,0 +1,21 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for X12CharacterSet. + /// + + + public static class X12CharacterSet + { + public const string NotSpecified = "NotSpecified"; + public const string Basic = "Basic"; + public const string Extended = "Extended"; + public const string UTF8 = "UTF8"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DateFormat.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DateFormat.cs new file mode 100644 index 000000000000..8023db23263b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DateFormat.cs @@ -0,0 +1,20 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for X12DateFormat. + /// + + + public static class X12DateFormat + { + public const string NotSpecified = "NotSpecified"; + public const string Ccyymmdd = "CCYYMMDD"; + public const string Yymmdd = "YYMMDD"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DelimiterOverrides.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DelimiterOverrides.cs new file mode 100644 index 000000000000..bc1f734b7d8a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12DelimiterOverrides.cs @@ -0,0 +1,142 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 delimiter override settings. + /// + public partial class X12DelimiterOverrides + { + /// + /// Initializes a new instance of the X12DelimiterOverrides class. + /// + public X12DelimiterOverrides() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12DelimiterOverrides class. + /// + + /// The protocol version. + /// + + /// The message id. + /// + + /// The data element separator. + /// + + /// The component separator. + /// + + /// The segment terminator. + /// + + /// The segment terminator suffix. + /// Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + + /// The replacement character. + /// + + /// The value indicating whether to replace separators in payload. + /// + + /// The target namespace on which this delimiter settings has to be applied. + /// + public X12DelimiterOverrides(int dataElementSeparator, int componentSeparator, int segmentTerminator, SegmentTerminatorSuffix segmentTerminatorSuffix, int replaceCharacter, bool replaceSeparatorsInPayload, string protocolVersion = default(string), string messageId = default(string), string targetNamespace = default(string)) + + { + this.ProtocolVersion = protocolVersion; + this.MessageId = messageId; + this.DataElementSeparator = dataElementSeparator; + this.ComponentSeparator = componentSeparator; + this.SegmentTerminator = segmentTerminator; + this.SegmentTerminatorSuffix = segmentTerminatorSuffix; + this.ReplaceCharacter = replaceCharacter; + this.ReplaceSeparatorsInPayload = replaceSeparatorsInPayload; + this.TargetNamespace = targetNamespace; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the protocol version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolVersion")] + public string ProtocolVersion {get; set; } + + /// + /// Gets or sets the message id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the data element separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dataElementSeparator")] + public int DataElementSeparator {get; set; } + + /// + /// Gets or sets the component separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "componentSeparator")] + public int ComponentSeparator {get; set; } + + /// + /// Gets or sets the segment terminator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminator")] + public int SegmentTerminator {get; set; } + + /// + /// Gets or sets the segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminatorSuffix")] + public SegmentTerminatorSuffix SegmentTerminatorSuffix {get; set; } + + /// + /// Gets or sets the replacement character. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "replaceCharacter")] + public int ReplaceCharacter {get; set; } + + /// + /// Gets or sets the value indicating whether to replace separators in payload. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "replaceSeparatorsInPayload")] + public bool ReplaceSeparatorsInPayload {get; set; } + + /// + /// Gets or sets the target namespace on which this delimiter settings has to + /// be applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNamespace")] + public string TargetNamespace {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeOverride.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeOverride.cs new file mode 100644 index 000000000000..4900001ff476 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeOverride.cs @@ -0,0 +1,197 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 envelope override settings. + /// + public partial class X12EnvelopeOverride + { + /// + /// Initializes a new instance of the X12EnvelopeOverride class. + /// + public X12EnvelopeOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12EnvelopeOverride class. + /// + + /// The target namespace on which this envelope settings has to be applied. + /// + + /// The protocol version on which this envelope settings has to be applied. + /// + + /// The message id on which this envelope settings has to be applied. + /// + + /// The responsible agency code. + /// + + /// The header version. + /// + + /// The sender application id. + /// + + /// The receiver application id. + /// + + /// The functional identifier code. + /// + + /// The date format. + /// Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + + /// The time format. + /// Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + /// 'HHMMSSd' + public X12EnvelopeOverride(string targetNamespace, string protocolVersion, string messageId, string responsibleAgencyCode, string headerVersion, string senderApplicationId, string receiverApplicationId, string dateFormat, string timeFormat, string functionalIdentifierCode = default(string)) + + { + this.TargetNamespace = targetNamespace; + this.ProtocolVersion = protocolVersion; + this.MessageId = messageId; + this.ResponsibleAgencyCode = responsibleAgencyCode; + this.HeaderVersion = headerVersion; + this.SenderApplicationId = senderApplicationId; + this.ReceiverApplicationId = receiverApplicationId; + this.FunctionalIdentifierCode = functionalIdentifierCode; + this.DateFormat = dateFormat; + this.TimeFormat = timeFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the target namespace on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetNamespace")] + public string TargetNamespace {get; set; } + + /// + /// Gets or sets the protocol version on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolVersion")] + public string ProtocolVersion {get; set; } + + /// + /// Gets or sets the message id on which this envelope settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the responsible agency code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "responsibleAgencyCode")] + public string ResponsibleAgencyCode {get; set; } + + /// + /// Gets or sets the header version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "headerVersion")] + public string HeaderVersion {get; set; } + + /// + /// Gets or sets the sender application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationId")] + public string SenderApplicationId {get; set; } + + /// + /// Gets or sets the receiver application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverApplicationId")] + public string ReceiverApplicationId {get; set; } + + /// + /// Gets or sets the functional identifier code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "functionalIdentifierCode")] + public string FunctionalIdentifierCode {get; set; } + + /// + /// Gets or sets the date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dateFormat")] + public string DateFormat {get; set; } + + /// + /// Gets or sets the time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timeFormat")] + public string TimeFormat {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.TargetNamespace == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TargetNamespace"); + } + if (this.ProtocolVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProtocolVersion"); + } + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + if (this.ResponsibleAgencyCode == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ResponsibleAgencyCode"); + } + if (this.HeaderVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "HeaderVersion"); + } + if (this.SenderApplicationId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SenderApplicationId"); + } + if (this.ReceiverApplicationId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiverApplicationId"); + } + if (this.DateFormat == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "DateFormat"); + } + if (this.TimeFormat == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TimeFormat"); + } + + + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeSettings.cs new file mode 100644 index 000000000000..3b9f1973c07b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12EnvelopeSettings.cs @@ -0,0 +1,338 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement envelope settings. + /// + public partial class X12EnvelopeSettings + { + /// + /// Initializes a new instance of the X12EnvelopeSettings class. + /// + public X12EnvelopeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12EnvelopeSettings class. + /// + + /// The controls standards id. + /// + + /// The value indicating whether to use control standards id as repetition + /// character. + /// + + /// The sender application id. + /// + + /// The receiver application id. + /// + + /// The control version number. + /// + + /// The interchange control number lower bound. + /// + + /// The interchange control number upper bound. + /// + + /// The value indicating whether to rollover interchange control number. + /// + + /// The value indicating whether to enable default group headers. + /// + + /// The functional group id. + /// + + /// The group control number lower bound. + /// + + /// The group control number upper bound. + /// + + /// The value indicating whether to rollover group control number. + /// + + /// The group header agency code. + /// + + /// The group header version. + /// + + /// The transaction set control number lower bound. + /// + + /// The transaction set control number upper bound. + /// + + /// The value indicating whether to rollover transaction set control number. + /// + + /// The transaction set control number prefix. + /// + + /// The transaction set control number suffix. + /// + + /// The value indicating whether to overwrite existing transaction set control + /// number. + /// + + /// The group header date format. + /// Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + + /// The group header time format. + /// Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', + /// 'HHMMSSd' + + /// The usage indicator. + /// Possible values include: 'NotSpecified', 'Test', 'Information', + /// 'Production' + public X12EnvelopeSettings(int controlStandardsId, bool useControlStandardsIdAsRepetitionCharacter, string senderApplicationId, string receiverApplicationId, string controlVersionNumber, int interchangeControlNumberLowerBound, int interchangeControlNumberUpperBound, bool rolloverInterchangeControlNumber, bool enableDefaultGroupHeaders, int groupControlNumberLowerBound, int groupControlNumberUpperBound, bool rolloverGroupControlNumber, string groupHeaderAgencyCode, string groupHeaderVersion, int transactionSetControlNumberLowerBound, int transactionSetControlNumberUpperBound, bool rolloverTransactionSetControlNumber, bool overwriteExistingTransactionSetControlNumber, string groupHeaderDateFormat, string groupHeaderTimeFormat, string usageIndicator, string functionalGroupId = default(string), string transactionSetControlNumberPrefix = default(string), string transactionSetControlNumberSuffix = default(string)) + + { + this.ControlStandardsId = controlStandardsId; + this.UseControlStandardsIdAsRepetitionCharacter = useControlStandardsIdAsRepetitionCharacter; + this.SenderApplicationId = senderApplicationId; + this.ReceiverApplicationId = receiverApplicationId; + this.ControlVersionNumber = controlVersionNumber; + this.InterchangeControlNumberLowerBound = interchangeControlNumberLowerBound; + this.InterchangeControlNumberUpperBound = interchangeControlNumberUpperBound; + this.RolloverInterchangeControlNumber = rolloverInterchangeControlNumber; + this.EnableDefaultGroupHeaders = enableDefaultGroupHeaders; + this.FunctionalGroupId = functionalGroupId; + this.GroupControlNumberLowerBound = groupControlNumberLowerBound; + this.GroupControlNumberUpperBound = groupControlNumberUpperBound; + this.RolloverGroupControlNumber = rolloverGroupControlNumber; + this.GroupHeaderAgencyCode = groupHeaderAgencyCode; + this.GroupHeaderVersion = groupHeaderVersion; + this.TransactionSetControlNumberLowerBound = transactionSetControlNumberLowerBound; + this.TransactionSetControlNumberUpperBound = transactionSetControlNumberUpperBound; + this.RolloverTransactionSetControlNumber = rolloverTransactionSetControlNumber; + this.TransactionSetControlNumberPrefix = transactionSetControlNumberPrefix; + this.TransactionSetControlNumberSuffix = transactionSetControlNumberSuffix; + this.OverwriteExistingTransactionSetControlNumber = overwriteExistingTransactionSetControlNumber; + this.GroupHeaderDateFormat = groupHeaderDateFormat; + this.GroupHeaderTimeFormat = groupHeaderTimeFormat; + this.UsageIndicator = usageIndicator; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the controls standards id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "controlStandardsId")] + public int ControlStandardsId {get; set; } + + /// + /// Gets or sets the value indicating whether to use control standards id as + /// repetition character. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "useControlStandardsIdAsRepetitionCharacter")] + public bool UseControlStandardsIdAsRepetitionCharacter {get; set; } + + /// + /// Gets or sets the sender application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationId")] + public string SenderApplicationId {get; set; } + + /// + /// Gets or sets the receiver application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverApplicationId")] + public string ReceiverApplicationId {get; set; } + + /// + /// Gets or sets the control version number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "controlVersionNumber")] + public string ControlVersionNumber {get; set; } + + /// + /// Gets or sets the interchange control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberLowerBound")] + public int InterchangeControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the interchange control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberUpperBound")] + public int InterchangeControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover interchange control + /// number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverInterchangeControlNumber")] + public bool RolloverInterchangeControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether to enable default group headers. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableDefaultGroupHeaders")] + public bool EnableDefaultGroupHeaders {get; set; } + + /// + /// Gets or sets the functional group id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "functionalGroupId")] + public string FunctionalGroupId {get; set; } + + /// + /// Gets or sets the group control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberLowerBound")] + public int GroupControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the group control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupControlNumberUpperBound")] + public int GroupControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover group control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverGroupControlNumber")] + public bool RolloverGroupControlNumber {get; set; } + + /// + /// Gets or sets the group header agency code. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderAgencyCode")] + public string GroupHeaderAgencyCode {get; set; } + + /// + /// Gets or sets the group header version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderVersion")] + public string GroupHeaderVersion {get; set; } + + /// + /// Gets or sets the transaction set control number lower bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberLowerBound")] + public int TransactionSetControlNumberLowerBound {get; set; } + + /// + /// Gets or sets the transaction set control number upper bound. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberUpperBound")] + public int TransactionSetControlNumberUpperBound {get; set; } + + /// + /// Gets or sets the value indicating whether to rollover transaction set + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "rolloverTransactionSetControlNumber")] + public bool RolloverTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the transaction set control number prefix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberPrefix")] + public string TransactionSetControlNumberPrefix {get; set; } + + /// + /// Gets or sets the transaction set control number suffix. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transactionSetControlNumberSuffix")] + public string TransactionSetControlNumberSuffix {get; set; } + + /// + /// Gets or sets the value indicating whether to overwrite existing transaction + /// set control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "overwriteExistingTransactionSetControlNumber")] + public bool OverwriteExistingTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the group header date format. Possible values include: 'NotSpecified', 'CCYYMMDD', 'YYMMDD' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderDateFormat")] + public string GroupHeaderDateFormat {get; set; } + + /// + /// Gets or sets the group header time format. Possible values include: 'NotSpecified', 'HHMM', 'HHMMSS', 'HHMMSSdd', 'HHMMSSd' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "groupHeaderTimeFormat")] + public string GroupHeaderTimeFormat {get; set; } + + /// + /// Gets or sets the usage indicator. Possible values include: 'NotSpecified', 'Test', 'Information', 'Production' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "usageIndicator")] + public string UsageIndicator {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SenderApplicationId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SenderApplicationId"); + } + if (this.ReceiverApplicationId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiverApplicationId"); + } + if (this.ControlVersionNumber == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ControlVersionNumber"); + } + if (this.GroupHeaderAgencyCode == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GroupHeaderAgencyCode"); + } + if (this.GroupHeaderVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GroupHeaderVersion"); + } + if (this.GroupHeaderDateFormat == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GroupHeaderDateFormat"); + } + if (this.GroupHeaderTimeFormat == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "GroupHeaderTimeFormat"); + } + if (this.UsageIndicator == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "UsageIndicator"); + } + + + + + + + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12FramingSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12FramingSettings.cs new file mode 100644 index 000000000000..15a206f14081 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12FramingSettings.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement framing settings. + /// + public partial class X12FramingSettings + { + /// + /// Initializes a new instance of the X12FramingSettings class. + /// + public X12FramingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12FramingSettings class. + /// + + /// The data element separator. + /// + + /// The component separator. + /// + + /// The value indicating whether to replace separators in payload. + /// + + /// The replacement character. + /// + + /// The segment terminator. + /// + + /// The X12 character set. + /// Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + + /// The segment terminator suffix. + /// Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + public X12FramingSettings(int dataElementSeparator, int componentSeparator, bool replaceSeparatorsInPayload, int replaceCharacter, int segmentTerminator, string characterSet, SegmentTerminatorSuffix segmentTerminatorSuffix) + + { + this.DataElementSeparator = dataElementSeparator; + this.ComponentSeparator = componentSeparator; + this.ReplaceSeparatorsInPayload = replaceSeparatorsInPayload; + this.ReplaceCharacter = replaceCharacter; + this.SegmentTerminator = segmentTerminator; + this.CharacterSet = characterSet; + this.SegmentTerminatorSuffix = segmentTerminatorSuffix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the data element separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dataElementSeparator")] + public int DataElementSeparator {get; set; } + + /// + /// Gets or sets the component separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "componentSeparator")] + public int ComponentSeparator {get; set; } + + /// + /// Gets or sets the value indicating whether to replace separators in payload. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "replaceSeparatorsInPayload")] + public bool ReplaceSeparatorsInPayload {get; set; } + + /// + /// Gets or sets the replacement character. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "replaceCharacter")] + public int ReplaceCharacter {get; set; } + + /// + /// Gets or sets the segment terminator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminator")] + public int SegmentTerminator {get; set; } + + /// + /// Gets or sets the X12 character set. Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "characterSet")] + public string CharacterSet {get; set; } + + /// + /// Gets or sets the segment terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR', 'LF', 'CRLF' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "segmentTerminatorSuffix")] + public SegmentTerminatorSuffix SegmentTerminatorSuffix {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.CharacterSet == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "CharacterSet"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageFilter.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageFilter.cs new file mode 100644 index 000000000000..552a4d4d97d8 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageFilter.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 message filter for odata query. + /// + public partial class X12MessageFilter + { + /// + /// Initializes a new instance of the X12MessageFilter class. + /// + public X12MessageFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12MessageFilter class. + /// + + /// The message filter type. + /// Possible values include: 'NotSpecified', 'Include', 'Exclude' + public X12MessageFilter(string messageFilterType) + + { + this.MessageFilterType = messageFilterType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message filter type. Possible values include: 'NotSpecified', 'Include', 'Exclude' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilterType")] + public string MessageFilterType {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageFilterType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageFilterType"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageIdentifier.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageIdentifier.cs new file mode 100644 index 000000000000..3329d152c1af --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12MessageIdentifier.cs @@ -0,0 +1,62 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 message identifier. + /// + public partial class X12MessageIdentifier + { + /// + /// Initializes a new instance of the X12MessageIdentifier class. + /// + public X12MessageIdentifier() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12MessageIdentifier class. + /// + + /// The message id. + /// + public X12MessageIdentifier(string messageId) + + { + this.MessageId = messageId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12OneWayAgreement.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12OneWayAgreement.cs new file mode 100644 index 000000000000..ad14c6f7882d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12OneWayAgreement.cs @@ -0,0 +1,101 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 one-way agreement. + /// + public partial class X12OneWayAgreement + { + /// + /// Initializes a new instance of the X12OneWayAgreement class. + /// + public X12OneWayAgreement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12OneWayAgreement class. + /// + + /// The sender business identity + /// + + /// The receiver business identity + /// + + /// The X12 protocol settings. + /// + public X12OneWayAgreement(BusinessIdentity senderBusinessIdentity, BusinessIdentity receiverBusinessIdentity, X12ProtocolSettings protocolSettings) + + { + this.SenderBusinessIdentity = senderBusinessIdentity; + this.ReceiverBusinessIdentity = receiverBusinessIdentity; + this.ProtocolSettings = protocolSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the sender business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderBusinessIdentity")] + public BusinessIdentity SenderBusinessIdentity {get; set; } + + /// + /// Gets or sets the receiver business identity + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "receiverBusinessIdentity")] + public BusinessIdentity ReceiverBusinessIdentity {get; set; } + + /// + /// Gets or sets the X12 protocol settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "protocolSettings")] + public X12ProtocolSettings ProtocolSettings {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.SenderBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SenderBusinessIdentity"); + } + if (this.ReceiverBusinessIdentity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ReceiverBusinessIdentity"); + } + if (this.ProtocolSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProtocolSettings"); + } + if (this.SenderBusinessIdentity != null) + { + this.SenderBusinessIdentity.Validate(); + } + if (this.ReceiverBusinessIdentity != null) + { + this.ReceiverBusinessIdentity.Validate(); + } + if (this.ProtocolSettings != null) + { + this.ProtocolSettings.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProcessingSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProcessingSettings.cs new file mode 100644 index 000000000000..77ed8bd41539 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProcessingSettings.cs @@ -0,0 +1,111 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 processing settings. + /// + public partial class X12ProcessingSettings + { + /// + /// Initializes a new instance of the X12ProcessingSettings class. + /// + public X12ProcessingSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12ProcessingSettings class. + /// + + /// The value indicating whether to mask security information. + /// + + /// The value indicating whether to convert numerical type to implied decimal. + /// + + /// The value indicating whether to preserve interchange. + /// + + /// The value indicating whether to suspend interchange on error. + /// + + /// The value indicating whether to create empty xml tags for trailing + /// separators. + /// + + /// The value indicating whether to use dot as decimal separator. + /// + public X12ProcessingSettings(bool maskSecurityInfo, bool convertImpliedDecimal, bool preserveInterchange, bool suspendInterchangeOnError, bool createEmptyXmlTagsForTrailingSeparators, bool useDotAsDecimalSeparator) + + { + this.MaskSecurityInfo = maskSecurityInfo; + this.ConvertImpliedDecimal = convertImpliedDecimal; + this.PreserveInterchange = preserveInterchange; + this.SuspendInterchangeOnError = suspendInterchangeOnError; + this.CreateEmptyXmlTagsForTrailingSeparators = createEmptyXmlTagsForTrailingSeparators; + this.UseDotAsDecimalSeparator = useDotAsDecimalSeparator; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to mask security information. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maskSecurityInfo")] + public bool MaskSecurityInfo {get; set; } + + /// + /// Gets or sets the value indicating whether to convert numerical type to + /// implied decimal. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "convertImpliedDecimal")] + public bool ConvertImpliedDecimal {get; set; } + + /// + /// Gets or sets the value indicating whether to preserve interchange. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "preserveInterchange")] + public bool PreserveInterchange {get; set; } + + /// + /// Gets or sets the value indicating whether to suspend interchange on error. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "suspendInterchangeOnError")] + public bool SuspendInterchangeOnError {get; set; } + + /// + /// Gets or sets the value indicating whether to create empty xml tags for + /// trailing separators. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "createEmptyXmlTagsForTrailingSeparators")] + public bool CreateEmptyXmlTagsForTrailingSeparators {get; set; } + + /// + /// Gets or sets the value indicating whether to use dot as decimal separator. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "useDotAsDecimalSeparator")] + public bool UseDotAsDecimalSeparator {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProtocolSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProtocolSettings.cs new file mode 100644 index 000000000000..7cf3a4ac934e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ProtocolSettings.cs @@ -0,0 +1,277 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement protocol settings. + /// + public partial class X12ProtocolSettings + { + /// + /// Initializes a new instance of the X12ProtocolSettings class. + /// + public X12ProtocolSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12ProtocolSettings class. + /// + + /// The X12 validation settings. + /// + + /// The X12 framing settings. + /// + + /// The X12 envelope settings. + /// + + /// The X12 acknowledgment settings. + /// + + /// The X12 message filter. + /// + + /// The X12 security settings. + /// + + /// The X12 processing settings. + /// + + /// The X12 envelope override settings. + /// + + /// The X12 validation override settings. + /// + + /// The X12 message filter list. + /// + + /// The X12 schema references. + /// + + /// The X12 delimiter override settings. + /// + public X12ProtocolSettings(X12ValidationSettings validationSettings, X12FramingSettings framingSettings, X12EnvelopeSettings envelopeSettings, X12AcknowledgementSettings acknowledgementSettings, X12MessageFilter messageFilter, X12SecuritySettings securitySettings, X12ProcessingSettings processingSettings, System.Collections.Generic.IList schemaReferences, System.Collections.Generic.IList envelopeOverrides = default(System.Collections.Generic.IList), System.Collections.Generic.IList validationOverrides = default(System.Collections.Generic.IList), System.Collections.Generic.IList messageFilterList = default(System.Collections.Generic.IList), System.Collections.Generic.IList x12DelimiterOverrides = default(System.Collections.Generic.IList)) + + { + this.ValidationSettings = validationSettings; + this.FramingSettings = framingSettings; + this.EnvelopeSettings = envelopeSettings; + this.AcknowledgementSettings = acknowledgementSettings; + this.MessageFilter = messageFilter; + this.SecuritySettings = securitySettings; + this.ProcessingSettings = processingSettings; + this.EnvelopeOverrides = envelopeOverrides; + this.ValidationOverrides = validationOverrides; + this.MessageFilterList = messageFilterList; + this.SchemaReferences = schemaReferences; + this.X12DelimiterOverrides = x12DelimiterOverrides; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the X12 validation settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validationSettings")] + public X12ValidationSettings ValidationSettings {get; set; } + + /// + /// Gets or sets the X12 framing settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "framingSettings")] + public X12FramingSettings FramingSettings {get; set; } + + /// + /// Gets or sets the X12 envelope settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "envelopeSettings")] + public X12EnvelopeSettings EnvelopeSettings {get; set; } + + /// + /// Gets or sets the X12 acknowledgment settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "acknowledgementSettings")] + public X12AcknowledgementSettings AcknowledgementSettings {get; set; } + + /// + /// Gets or sets the X12 message filter. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilter")] + public X12MessageFilter MessageFilter {get; set; } + + /// + /// Gets or sets the X12 security settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "securitySettings")] + public X12SecuritySettings SecuritySettings {get; set; } + + /// + /// Gets or sets the X12 processing settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "processingSettings")] + public X12ProcessingSettings ProcessingSettings {get; set; } + + /// + /// Gets or sets the X12 envelope override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "envelopeOverrides")] + public System.Collections.Generic.IList EnvelopeOverrides {get; set; } + + /// + /// Gets or sets the X12 validation override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validationOverrides")] + public System.Collections.Generic.IList ValidationOverrides {get; set; } + + /// + /// Gets or sets the X12 message filter list. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageFilterList")] + public System.Collections.Generic.IList MessageFilterList {get; set; } + + /// + /// Gets or sets the X12 schema references. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaReferences")] + public System.Collections.Generic.IList SchemaReferences {get; set; } + + /// + /// Gets or sets the X12 delimiter override settings. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x12DelimiterOverrides")] + public System.Collections.Generic.IList X12DelimiterOverrides {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ValidationSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ValidationSettings"); + } + if (this.FramingSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "FramingSettings"); + } + if (this.EnvelopeSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "EnvelopeSettings"); + } + if (this.AcknowledgementSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AcknowledgementSettings"); + } + if (this.MessageFilter == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageFilter"); + } + if (this.SecuritySettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SecuritySettings"); + } + if (this.ProcessingSettings == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProcessingSettings"); + } + if (this.SchemaReferences == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaReferences"); + } + if (this.ValidationSettings != null) + { + this.ValidationSettings.Validate(); + } + if (this.FramingSettings != null) + { + this.FramingSettings.Validate(); + } + if (this.EnvelopeSettings != null) + { + this.EnvelopeSettings.Validate(); + } + if (this.AcknowledgementSettings != null) + { + this.AcknowledgementSettings.Validate(); + } + if (this.MessageFilter != null) + { + this.MessageFilter.Validate(); + } + if (this.SecuritySettings != null) + { + this.SecuritySettings.Validate(); + } + if (this.ProcessingSettings != null) + { + this.ProcessingSettings.Validate(); + } + if (this.EnvelopeOverrides != null) + { + foreach (var element in this.EnvelopeOverrides) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.ValidationOverrides != null) + { + foreach (var element in this.ValidationOverrides) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.MessageFilterList != null) + { + foreach (var element in this.MessageFilterList) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.SchemaReferences != null) + { + foreach (var element in this.SchemaReferences) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.X12DelimiterOverrides != null) + { + foreach (var element in this.X12DelimiterOverrides) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SchemaReference.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SchemaReference.cs new file mode 100644 index 000000000000..825a71f7928b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SchemaReference.cs @@ -0,0 +1,103 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 schema reference. + /// + public partial class X12SchemaReference + { + /// + /// Initializes a new instance of the X12SchemaReference class. + /// + public X12SchemaReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12SchemaReference class. + /// + + /// The message id. + /// + + /// The sender application id. + /// + + /// The schema version. + /// + + /// The schema name. + /// + public X12SchemaReference(string messageId, string schemaVersion, string schemaName, string senderApplicationId = default(string)) + + { + this.MessageId = messageId; + this.SenderApplicationId = senderApplicationId; + this.SchemaVersion = schemaVersion; + this.SchemaName = schemaName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the sender application id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "senderApplicationId")] + public string SenderApplicationId {get; set; } + + /// + /// Gets or sets the schema version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaVersion")] + public string SchemaVersion {get; set; } + + /// + /// Gets or sets the schema name. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "schemaName")] + public string SchemaName {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + if (this.SchemaVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaVersion"); + } + if (this.SchemaName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SchemaName"); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SecuritySettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SecuritySettings.cs new file mode 100644 index 000000000000..7036c6e5a08f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12SecuritySettings.cs @@ -0,0 +1,99 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement security settings. + /// + public partial class X12SecuritySettings + { + /// + /// Initializes a new instance of the X12SecuritySettings class. + /// + public X12SecuritySettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12SecuritySettings class. + /// + + /// The authorization qualifier. + /// + + /// The authorization value. + /// + + /// The security qualifier. + /// + + /// The password value. + /// + public X12SecuritySettings(string authorizationQualifier, string securityQualifier, string authorizationValue = default(string), string passwordValue = default(string)) + + { + this.AuthorizationQualifier = authorizationQualifier; + this.AuthorizationValue = authorizationValue; + this.SecurityQualifier = securityQualifier; + this.PasswordValue = passwordValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the authorization qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "authorizationQualifier")] + public string AuthorizationQualifier {get; set; } + + /// + /// Gets or sets the authorization value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "authorizationValue")] + public string AuthorizationValue {get; set; } + + /// + /// Gets or sets the security qualifier. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "securityQualifier")] + public string SecurityQualifier {get; set; } + + /// + /// Gets or sets the password value. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "passwordValue")] + public string PasswordValue {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.AuthorizationQualifier == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AuthorizationQualifier"); + } + if (this.SecurityQualifier == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "SecurityQualifier"); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12TimeFormat.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12TimeFormat.cs new file mode 100644 index 000000000000..40f67d17a9b9 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12TimeFormat.cs @@ -0,0 +1,22 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + + /// + /// Defines values for X12TimeFormat. + /// + + + public static class X12TimeFormat + { + public const string NotSpecified = "NotSpecified"; + public const string Hhmm = "HHMM"; + public const string Hhmmss = "HHMMSS"; + public const string HhmmsSdd = "HHMMSSdd"; + public const string HhmmsSd = "HHMMSSd"; + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationOverride.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationOverride.cs new file mode 100644 index 000000000000..d8ced602e32e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationOverride.cs @@ -0,0 +1,133 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 validation override settings. + /// + public partial class X12ValidationOverride + { + /// + /// Initializes a new instance of the X12ValidationOverride class. + /// + public X12ValidationOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12ValidationOverride class. + /// + + /// The message id on which the validation settings has to be applied. + /// + + /// The value indicating whether to validate EDI types. + /// + + /// The value indicating whether to validate XSD types. + /// + + /// The value indicating whether to allow leading and trailing spaces and + /// zeroes. + /// + + /// The value indicating whether to validate character Set. + /// + + /// The value indicating whether to trim leading and trailing spaces and + /// zeroes. + /// + + /// The trailing separator policy. + /// Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + /// 'Mandatory' + public X12ValidationOverride(string messageId, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, bool validateCharacterSet, bool trimLeadingAndTrailingSpacesAndZeroes, string trailingSeparatorPolicy) + + { + this.MessageId = messageId; + this.ValidateEdiTypes = validateEdiTypes; + this.ValidateXsdTypes = validateXsdTypes; + this.AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; + this.ValidateCharacterSet = validateCharacterSet; + this.TrimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; + this.TrailingSeparatorPolicy = trailingSeparatorPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the message id on which the validation settings has to be + /// applied. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "messageId")] + public string MessageId {get; set; } + + /// + /// Gets or sets the value indicating whether to validate EDI types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateEDITypes")] + public bool ValidateEdiTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to validate XSD types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateXSDTypes")] + public bool ValidateXsdTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to allow leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "allowLeadingAndTrailingSpacesAndZeroes")] + public bool AllowLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the value indicating whether to validate character Set. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateCharacterSet")] + public bool ValidateCharacterSet {get; set; } + + /// + /// Gets or sets the value indicating whether to trim leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trimLeadingAndTrailingSpacesAndZeroes")] + public bool TrimLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trailingSeparatorPolicy")] + public string TrailingSeparatorPolicy {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.MessageId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "MessageId"); + } + if (this.TrailingSeparatorPolicy == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TrailingSeparatorPolicy"); + } + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationSettings.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationSettings.cs new file mode 100644 index 000000000000..b63e4ffd67ff --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Models/X12ValidationSettings.cs @@ -0,0 +1,163 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic.Models +{ + using System.Linq; + + /// + /// The X12 agreement validation settings. + /// + public partial class X12ValidationSettings + { + /// + /// Initializes a new instance of the X12ValidationSettings class. + /// + public X12ValidationSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the X12ValidationSettings class. + /// + + /// The value indicating whether to validate character set in the message. + /// + + /// The value indicating whether to check for duplicate interchange control + /// number. + /// + + /// The validity period of interchange control number. + /// + + /// The value indicating whether to check for duplicate group control number. + /// + + /// The value indicating whether to check for duplicate transaction set control + /// number. + /// + + /// The value indicating whether to Whether to validate EDI types. + /// + + /// The value indicating whether to Whether to validate XSD types. + /// + + /// The value indicating whether to allow leading and trailing spaces and + /// zeroes. + /// + + /// The value indicating whether to trim leading and trailing spaces and + /// zeroes. + /// + + /// The trailing separator policy. + /// Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', + /// 'Mandatory' + public X12ValidationSettings(bool validateCharacterSet, bool checkDuplicateInterchangeControlNumber, int interchangeControlNumberValidityDays, bool checkDuplicateGroupControlNumber, bool checkDuplicateTransactionSetControlNumber, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, bool trimLeadingAndTrailingSpacesAndZeroes, string trailingSeparatorPolicy) + + { + this.ValidateCharacterSet = validateCharacterSet; + this.CheckDuplicateInterchangeControlNumber = checkDuplicateInterchangeControlNumber; + this.InterchangeControlNumberValidityDays = interchangeControlNumberValidityDays; + this.CheckDuplicateGroupControlNumber = checkDuplicateGroupControlNumber; + this.CheckDuplicateTransactionSetControlNumber = checkDuplicateTransactionSetControlNumber; + this.ValidateEdiTypes = validateEdiTypes; + this.ValidateXsdTypes = validateXsdTypes; + this.AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes; + this.TrimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes; + this.TrailingSeparatorPolicy = trailingSeparatorPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the value indicating whether to validate character set in the + /// message. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateCharacterSet")] + public bool ValidateCharacterSet {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate + /// interchange control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateInterchangeControlNumber")] + public bool CheckDuplicateInterchangeControlNumber {get; set; } + + /// + /// Gets or sets the validity period of interchange control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "interchangeControlNumberValidityDays")] + public int InterchangeControlNumberValidityDays {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate group + /// control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateGroupControlNumber")] + public bool CheckDuplicateGroupControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether to check for duplicate + /// transaction set control number. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "checkDuplicateTransactionSetControlNumber")] + public bool CheckDuplicateTransactionSetControlNumber {get; set; } + + /// + /// Gets or sets the value indicating whether to Whether to validate EDI types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateEDITypes")] + public bool ValidateEdiTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to Whether to validate XSD types. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "validateXSDTypes")] + public bool ValidateXsdTypes {get; set; } + + /// + /// Gets or sets the value indicating whether to allow leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "allowLeadingAndTrailingSpacesAndZeroes")] + public bool AllowLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the value indicating whether to trim leading and trailing + /// spaces and zeroes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trimLeadingAndTrailingSpacesAndZeroes")] + public bool TrimLeadingAndTrailingSpacesAndZeroes {get; set; } + + /// + /// Gets or sets the trailing separator policy. Possible values include: 'NotSpecified', 'NotAllowed', 'Optional', 'Mandatory' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "trailingSeparatorPolicy")] + public string TrailingSeparatorPolicy {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.TrailingSeparatorPolicy == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "TrailingSeparatorPolicy"); + } + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/Operations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/Operations.cs new file mode 100644 index 000000000000..899542cf7df5 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/Operations.cs @@ -0,0 +1,401 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// Operations operations. + /// + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Logic/operations").ToString(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/OperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..dcb7c252e337 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/OperationsExtensions.cs @@ -0,0 +1,76 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for Operations + /// + public static partial class OperationsExtensions + { + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IOperations operations, string nextPageLink) + { + return ((IOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all of the available Logic REST API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperations.cs new file mode 100644 index 000000000000..6ebc90c82b62 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperations.cs @@ -0,0 +1,761 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRepetitionsOperations operations. + /// + internal partial class WorkflowRunActionRepetitionsOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunActionRepetitionsOperations + { + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunActionRepetitionsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get a workflow run action repetition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (repetitionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "repetitionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("repetitionName", repetitionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{repetitionName}", System.Uri.EscapeDataString(repetitionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Lists a workflow run expression trace. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListExpressionTracesWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (repetitionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "repetitionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("repetitionName", repetitionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListExpressionTraces", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{repetitionName}", System.Uri.EscapeDataString(repetitionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperationsExtensions.cs new file mode 100644 index 000000000000..8092d03f38b4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsOperationsExtensions.cs @@ -0,0 +1,181 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunActionRepetitionsOperations + /// + public static partial class WorkflowRunActionRepetitionsOperationsExtensions + { + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + public static System.Collections.Generic.IEnumerable List(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName) + { + return ((IWorkflowRunActionRepetitionsOperations)operations).ListAsync(resourceGroupName, workflowName, runName, actionName).GetAwaiter().GetResult(); + } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a workflow run action repetition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + public static WorkflowRunActionRepetitionDefinition Get(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName) + { + return ((IWorkflowRunActionRepetitionsOperations)operations).GetAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).GetAwaiter().GetResult(); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists a workflow run expression trace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + public static System.Collections.Generic.IEnumerable ListExpressionTraces(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName) + { + return ((IWorkflowRunActionRepetitionsOperations)operations).ListExpressionTracesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).GetAwaiter().GetResult(); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListExpressionTracesAsync(this IWorkflowRunActionRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListExpressionTracesWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperations.cs new file mode 100644 index 000000000000..8c69fa6e9957 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperations.cs @@ -0,0 +1,705 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRepetitionsRequestHistoriesOperations operations. + /// + internal partial class WorkflowRunActionRepetitionsRequestHistoriesOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunActionRepetitionsRequestHistoriesOperations + { + /// + /// Initializes a new instance of the WorkflowRunActionRepetitionsRequestHistoriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunActionRepetitionsRequestHistoriesOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// List a workflow run repetition request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (repetitionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "repetitionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("repetitionName", repetitionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{repetitionName}", System.Uri.EscapeDataString(repetitionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow run repetition request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The request history name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (repetitionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "repetitionName"); + } + + if (requestHistoryName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "requestHistoryName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("repetitionName", repetitionName); + tracingParameters.Add("requestHistoryName", requestHistoryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{repetitionName}", System.Uri.EscapeDataString(repetitionName)); + _url = _url.Replace("{requestHistoryName}", System.Uri.EscapeDataString(requestHistoryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// List a workflow run repetition request history. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperationsExtensions.cs new file mode 100644 index 000000000000..6f0945b64228 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRepetitionsRequestHistoriesOperationsExtensions.cs @@ -0,0 +1,169 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunActionRepetitionsRequestHistoriesOperations + /// + public static partial class WorkflowRunActionRepetitionsRequestHistoriesOperationsExtensions + { + /// + /// List a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName) + { + return ((IWorkflowRunActionRepetitionsRequestHistoriesOperations)operations).ListAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).GetAwaiter().GetResult(); + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The request history name. + /// + public static RequestHistory Get(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + return ((IWorkflowRunActionRepetitionsRequestHistoriesOperations)operations).GetAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The request history name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// List a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string nextPageLink) + { + return ((IWorkflowRunActionRepetitionsRequestHistoriesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowRunActionRepetitionsRequestHistoriesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperations.cs new file mode 100644 index 000000000000..f78cb5c47340 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperations.cs @@ -0,0 +1,685 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionRequestHistoriesOperations operations. + /// + internal partial class WorkflowRunActionRequestHistoriesOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunActionRequestHistoriesOperations + { + /// + /// Initializes a new instance of the WorkflowRunActionRequestHistoriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunActionRequestHistoriesOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// List a workflow run request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow run request history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The request history name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string requestHistoryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (requestHistoryName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "requestHistoryName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("requestHistoryName", requestHistoryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{requestHistoryName}", System.Uri.EscapeDataString(requestHistoryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// List a workflow run request history. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperationsExtensions.cs new file mode 100644 index 000000000000..4e48eb919d19 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionRequestHistoriesOperationsExtensions.cs @@ -0,0 +1,157 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunActionRequestHistoriesOperations + /// + public static partial class WorkflowRunActionRequestHistoriesOperationsExtensions + { + /// + /// List a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowRunActionRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName) + { + return ((IWorkflowRunActionRequestHistoriesOperations)operations).ListAsync(resourceGroupName, workflowName, runName, actionName).GetAwaiter().GetResult(); + } + + /// + /// List a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowRunActionRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The request history name. + /// + public static RequestHistory Get(this IWorkflowRunActionRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string requestHistoryName) + { + return ((IWorkflowRunActionRequestHistoriesOperations)operations).GetAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The request history name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunActionRequestHistoriesOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, requestHistoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// List a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowRunActionRequestHistoriesOperations operations, string nextPageLink) + { + return ((IWorkflowRunActionRequestHistoriesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List a workflow run request history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowRunActionRequestHistoriesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperations.cs new file mode 100644 index 000000000000..06f7b5c7380f --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperations.cs @@ -0,0 +1,518 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionScopeRepetitionsOperations operations. + /// + internal partial class WorkflowRunActionScopeRepetitionsOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunActionScopeRepetitionsOperations + { + /// + /// Initializes a new instance of the WorkflowRunActionScopeRepetitionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunActionScopeRepetitionsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (repetitionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "repetitionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + tracingParameters.Add("repetitionName", repetitionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + _url = _url.Replace("{repetitionName}", System.Uri.EscapeDataString(repetitionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperationsExtensions.cs new file mode 100644 index 000000000000..bbb2d7939902 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionScopeRepetitionsOperationsExtensions.cs @@ -0,0 +1,124 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunActionScopeRepetitionsOperations + /// + public static partial class WorkflowRunActionScopeRepetitionsOperationsExtensions + { + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + public static WorkflowRunActionRepetitionDefinitionCollection List(this IWorkflowRunActionScopeRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName) + { + return ((IWorkflowRunActionScopeRepetitionsOperations)operations).ListAsync(resourceGroupName, workflowName, runName, actionName).GetAwaiter().GetResult(); + } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IWorkflowRunActionScopeRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + public static WorkflowRunActionRepetitionDefinition Get(this IWorkflowRunActionScopeRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName) + { + return ((IWorkflowRunActionScopeRepetitionsOperations)operations).GetAsync(resourceGroupName, workflowName, runName, actionName, repetitionName).GetAwaiter().GetResult(); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The workflow repetition. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunActionScopeRepetitionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, repetitionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperations.cs new file mode 100644 index 000000000000..d0a3e94da6f1 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperations.cs @@ -0,0 +1,926 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunActionsOperations operations. + /// + internal partial class WorkflowRunActionsOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunActionsOperations + { + /// + /// Initializes a new instance of the WorkflowRunActionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunActionsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowRunActionFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowRunActionFilter)) + { + _queryParameters.Add(_workflowRunActionFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow run action. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Lists a workflow run expression trace. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListExpressionTracesWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string actionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (actionName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "actionName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("actionName", actionName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListExpressionTraces", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{actionName}", System.Uri.EscapeDataString(actionName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflow run actions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperationsExtensions.cs new file mode 100644 index 000000000000..8d5de8b70c27 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunActionsOperationsExtensions.cs @@ -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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunActionsOperations + /// + public static partial class WorkflowRunActionsOperationsExtensions + { + /// + /// Gets a list of workflow run actions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowRunActionsOperations)operations).ListAsync(resourceGroupName, workflowName, runName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, runName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow run action. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + public static WorkflowRunAction Get(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName) + { + return ((IWorkflowRunActionsOperations)operations).GetAsync(resourceGroupName, workflowName, runName, actionName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow run action. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists a workflow run expression trace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + public static System.Collections.Generic.IEnumerable ListExpressionTraces(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName) + { + return ((IWorkflowRunActionsOperations)operations).ListExpressionTracesAsync(resourceGroupName, workflowName, runName, actionName).GetAwaiter().GetResult(); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow action name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListExpressionTracesAsync(this IWorkflowRunActionsOperations operations, string resourceGroupName, string workflowName, string runName, string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListExpressionTracesWithHttpMessagesAsync(resourceGroupName, workflowName, runName, actionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of workflow run actions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowRunActionsOperations operations, string nextPageLink) + { + return ((IWorkflowRunActionsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowRunActionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperations.cs new file mode 100644 index 000000000000..35575979d5a2 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperations.cs @@ -0,0 +1,275 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunOperations operations. + /// + internal partial class WorkflowRunOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunOperations + { + /// + /// Initializes a new instance of the WorkflowRunOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets an operation for a run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow operation id. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, string operationId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (operationId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "operationId"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + tracingParameters.Add("operationId", operationId); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperationsExtensions.cs new file mode 100644 index 000000000000..5e2ddf45724a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunOperationsExtensions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunOperations + /// + public static partial class WorkflowRunOperationsExtensions + { + /// + /// Gets an operation for a run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow operation id. + /// + public static WorkflowRun Get(this IWorkflowRunOperations operations, string resourceGroupName, string workflowName, string runName, string operationId) + { + return ((IWorkflowRunOperations)operations).GetAsync(resourceGroupName, workflowName, runName, operationId).GetAwaiter().GetResult(); + } + + /// + /// Gets an operation for a run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The workflow operation id. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunOperations operations, string resourceGroupName, string workflowName, string runName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, operationId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperations.cs new file mode 100644 index 000000000000..ac5e582296eb --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperations.cs @@ -0,0 +1,1077 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowRunsOperations operations. + /// + internal partial class WorkflowRunsOperations : Microsoft.Rest.IServiceOperations, IWorkflowRunsOperations + { + /// + /// Initializes a new instance of the WorkflowRunsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowRunsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflow runs. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowRunFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowRunFilter)) + { + _queryParameters.Add(_workflowRunFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Cancels a workflow run. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task CancelWithHttpMessagesAsync(string resourceGroupName, string workflowName, string runName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (runName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("runName", runName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{runName}", System.Uri.EscapeDataString(runName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflow runs. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperationsExtensions.cs new file mode 100644 index 000000000000..0072185f5c69 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowRunsOperationsExtensions.cs @@ -0,0 +1,223 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowRunsOperations + /// + public static partial class WorkflowRunsOperationsExtensions + { + /// + /// Gets a list of workflow runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowRunsOperations)operations).ListAsync(resourceGroupName, workflowName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + public static WorkflowRun Get(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName) + { + return ((IWorkflowRunsOperations)operations).GetAsync(resourceGroupName, workflowName, runName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, runName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + public static void Delete(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName) + { + ((IWorkflowRunsOperations)operations).DeleteAsync(resourceGroupName, workflowName, runName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workflowName, runName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Cancels a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + public static void Cancel(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName) + { + ((IWorkflowRunsOperations)operations).CancelAsync(resourceGroupName, workflowName, runName).GetAwaiter().GetResult(); + } + + /// + /// Cancels a workflow run. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow run name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CancelAsync(this IWorkflowRunsOperations operations, string resourceGroupName, string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, workflowName, runName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of workflow runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowRunsOperations operations, string nextPageLink) + { + return ((IWorkflowRunsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowRunsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperations.cs new file mode 100644 index 000000000000..1ddded7f1f18 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperations.cs @@ -0,0 +1,907 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowTriggerHistoriesOperations operations. + /// + internal partial class WorkflowTriggerHistoriesOperations : Microsoft.Rest.IServiceOperations, IWorkflowTriggerHistoriesOperations + { + /// + /// Initializes a new instance of the WorkflowTriggerHistoriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowTriggerHistoriesOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowTriggerHistoryFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowTriggerHistoryFilter)) + { + _queryParameters.Add(_workflowTriggerHistoryFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow trigger history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, string historyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (historyName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "historyName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("historyName", historyName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + _url = _url.Replace("{historyName}", System.Uri.EscapeDataString(historyName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task ResubmitWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, string historyName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (historyName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "historyName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("historyName", historyName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Resubmit", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + _url = _url.Replace("{historyName}", System.Uri.EscapeDataString(historyName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperationsExtensions.cs new file mode 100644 index 000000000000..d3916c6e3d2b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggerHistoriesOperationsExtensions.cs @@ -0,0 +1,203 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowTriggerHistoriesOperations + /// + public static partial class WorkflowTriggerHistoriesOperationsExtensions + { + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowTriggerHistoriesOperations)operations).ListAsync(resourceGroupName, workflowName, triggerName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow trigger history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + public static WorkflowTriggerHistory Get(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, string historyName) + { + return ((IWorkflowTriggerHistoriesOperations)operations).GetAsync(resourceGroupName, workflowName, triggerName, historyName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, historyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + public static void Resubmit(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, string historyName) + { + ((IWorkflowTriggerHistoriesOperations)operations).ResubmitAsync(resourceGroupName, workflowName, triggerName, historyName).GetAwaiter().GetResult(); + } + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers + /// that resulted in a run. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResubmitAsync(this IWorkflowTriggerHistoriesOperations operations, string resourceGroupName, string workflowName, string triggerName, string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ResubmitWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, historyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowTriggerHistoriesOperations operations, string nextPageLink) + { + return ((IWorkflowTriggerHistoriesOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowTriggerHistoriesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperations.cs new file mode 100644 index 000000000000..f13f58ca760b --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperations.cs @@ -0,0 +1,1738 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowTriggersOperations operations. + /// + internal partial class WorkflowTriggersOperations : Microsoft.Rest.IServiceOperations, IWorkflowTriggersOperations + { + /// + /// Initializes a new instance of the WorkflowTriggersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowTriggersOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowTriggerFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowTriggerFilter)) + { + _queryParameters.Add(_workflowTriggerFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Resets a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task ResetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Reset", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Runs a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task RunWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Run", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if (!_httpResponse.IsSuccessStatusCode) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the trigger schema as JSON. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetSchemaJsonWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetSchemaJson", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Sets the state of a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The workflow trigger state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task SetStateWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, SetTriggerStateActionDefinition setState, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (setState == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "setState"); + } + if (setState != null) + { + setState.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + tracingParameters.Add("setState", setState); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "SetState", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(setState != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(setState, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, string triggerName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("triggerName", triggerName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflow triggers. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperationsExtensions.cs new file mode 100644 index 000000000000..463bc46ca3ff --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowTriggersOperationsExtensions.cs @@ -0,0 +1,355 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowTriggersOperations + /// + public static partial class WorkflowTriggersOperationsExtensions + { + /// + /// Gets a list of workflow triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowTriggersOperations)operations).ListAsync(resourceGroupName, workflowName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static WorkflowTrigger Get(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName) + { + return ((IWorkflowTriggersOperations)operations).GetAsync(resourceGroupName, workflowName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Resets a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static void Reset(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName) + { + ((IWorkflowTriggersOperations)operations).ResetAsync(resourceGroupName, workflowName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Resets a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResetAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ResetWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Runs a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static void Run(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName) + { + ((IWorkflowTriggersOperations)operations).RunAsync(resourceGroupName, workflowName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Runs a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RunAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.RunWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the trigger schema as JSON. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static JsonSchema GetSchemaJson(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName) + { + return ((IWorkflowTriggersOperations)operations).GetSchemaJsonAsync(resourceGroupName, workflowName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Get the trigger schema as JSON. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetSchemaJsonAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetSchemaJsonWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Sets the state of a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static void SetState(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, SetTriggerStateActionDefinition setState) + { + ((IWorkflowTriggersOperations)operations).SetStateAsync(resourceGroupName, workflowName, triggerName, setState).GetAwaiter().GetResult(); + } + + /// + /// Sets the state of a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task SetStateAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, SetTriggerStateActionDefinition setState, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.SetStateWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, setState, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + public static WorkflowTriggerCallbackUrl ListCallbackUrl(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName) + { + return ((IWorkflowTriggersOperations)operations).ListCallbackUrlAsync(resourceGroupName, workflowName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListCallbackUrlAsync(this IWorkflowTriggersOperations operations, string resourceGroupName, string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListCallbackUrlWithHttpMessagesAsync(resourceGroupName, workflowName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of workflow triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowTriggersOperations operations, string nextPageLink) + { + return ((IWorkflowTriggersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowTriggersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperations.cs new file mode 100644 index 000000000000..311c53fcd467 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperations.cs @@ -0,0 +1,286 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowVersionTriggersOperations operations. + /// + internal partial class WorkflowVersionTriggersOperations : Microsoft.Rest.IServiceOperations, IWorkflowVersionTriggersOperations + { + /// + /// Initializes a new instance of the WorkflowVersionTriggersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowVersionTriggersOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Get the callback url for a trigger of a workflow version. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The workflow trigger name. + /// + /// + /// The callback URL parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, string versionId, string triggerName, GetCallbackUrlParameters parameters = default(GetCallbackUrlParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (versionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "versionId"); + } + + if (triggerName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "triggerName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("versionId", versionId); + tracingParameters.Add("triggerName", triggerName); + + tracingParameters.Add("parameters", parameters); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{versionId}", System.Uri.EscapeDataString(versionId)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperationsExtensions.cs new file mode 100644 index 000000000000..74b5c9e31b3e --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionTriggersOperationsExtensions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowVersionTriggersOperations + /// + public static partial class WorkflowVersionTriggersOperationsExtensions + { + /// + /// Get the callback url for a trigger of a workflow version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The workflow trigger name. + /// + public static WorkflowTriggerCallbackUrl ListCallbackUrl(this IWorkflowVersionTriggersOperations operations, string resourceGroupName, string workflowName, string versionId, string triggerName, GetCallbackUrlParameters parameters = default(GetCallbackUrlParameters)) + { + return ((IWorkflowVersionTriggersOperations)operations).ListCallbackUrlAsync(resourceGroupName, workflowName, versionId, triggerName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Get the callback url for a trigger of a workflow version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The workflow trigger name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListCallbackUrlAsync(this IWorkflowVersionTriggersOperations operations, string resourceGroupName, string workflowName, string versionId, string triggerName, GetCallbackUrlParameters parameters = default(GetCallbackUrlParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListCallbackUrlWithHttpMessagesAsync(resourceGroupName, workflowName, versionId, triggerName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperations.cs new file mode 100644 index 000000000000..92614c78b44a --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperations.cs @@ -0,0 +1,669 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowVersionsOperations operations. + /// + internal partial class WorkflowVersionsOperations : Microsoft.Rest.IServiceOperations, IWorkflowVersionsOperations + { + /// + /// Initializes a new instance of the WorkflowVersionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowVersionsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflow versions. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workflowName, int? top = default(int?), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("top", top); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(top, this.Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow version. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, string versionId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (versionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "versionId"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + tracingParameters.Add("versionId", versionId); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + _url = _url.Replace("{versionId}", System.Uri.EscapeDataString(versionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflow versions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperationsExtensions.cs new file mode 100644 index 000000000000..0644a4eda914 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowVersionsOperationsExtensions.cs @@ -0,0 +1,139 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowVersionsOperations + /// + public static partial class WorkflowVersionsOperationsExtensions + { + /// + /// Gets a list of workflow versions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The number of items to be included in the result. + /// + public static Microsoft.Rest.Azure.IPage List(this IWorkflowVersionsOperations operations, string resourceGroupName, string workflowName, int? top = default(int?)) + { + return ((IWorkflowVersionsOperations)operations).ListAsync(resourceGroupName, workflowName, top).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The number of items to be included in the result. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IWorkflowVersionsOperations operations, string resourceGroupName, string workflowName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workflowName, top, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + public static WorkflowVersion Get(this IWorkflowVersionsOperations operations, string resourceGroupName, string workflowName, string versionId) + { + return ((IWorkflowVersionsOperations)operations).GetAsync(resourceGroupName, workflowName, versionId).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow version. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow versionId. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowVersionsOperations operations, string resourceGroupName, string workflowName, string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, versionId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of workflow versions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IWorkflowVersionsOperations operations, string nextPageLink) + { + return ((IWorkflowVersionsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IWorkflowVersionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperations.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperations.cs new file mode 100644 index 000000000000..8913dbe8aa37 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperations.cs @@ -0,0 +1,3609 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Logic +{ + using System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// WorkflowsOperations operations. + /// + internal partial class WorkflowsOperations : Microsoft.Rest.IServiceOperations, IWorkflowsOperations + { + /// + /// Initializes a new instance of the WorkflowsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal WorkflowsOperations (LogicManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the LogicManagementClient + /// + public LogicManagementClient Client { get; private set; } + + /// + /// Gets a list of workflows by subscription. + /// + /// + /// + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListBySubscriptionWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowFilter)) + { + _queryParameters.Add(_workflowFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflows by resource group. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("odataQuery", odataQuery); + tracingParameters.Add("resourceGroupName", resourceGroupName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (odataQuery != null) + { + var _workflowFilter = odataQuery.ToString(); + if (!string.IsNullOrEmpty(_workflowFilter)) + { + _queryParameters.Add(_workflowFilter); + } + } + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Creates or updates a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (workflow == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflow"); + } + if (workflow != null) + { + workflow.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("workflow", workflow); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(workflow != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(workflow, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Updates a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (workflow == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflow"); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("workflow", workflow); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(workflow != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(workflow, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Deletes a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Disables a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task DisableWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Disable", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Enables a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task EnableWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Enable", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Generates the upgraded definition for a workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Parameters for generating an upgraded definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> GenerateUpgradedDefinitionWithHttpMessagesAsync(string resourceGroupName, string workflowName, GenerateUpgradedDefinitionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("parameters", parameters); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GenerateUpgradedDefinition", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get the workflow callback Url. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Which callback url to list. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListCallbackUrlWithHttpMessagesAsync(string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (listCallbackUrl == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "listCallbackUrl"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("listCallbackUrl", listCallbackUrl); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListCallbackUrl", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(listCallbackUrl != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(listCallbackUrl, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets an OpenAPI definition for the workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task> ListSwaggerWithHttpMessagesAsync(string resourceGroupName, string workflowName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListSwagger", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Moves an existing workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow to move. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task MoveWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow move, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (move == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "move"); + } + if (move != null) + { + move.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("move", move); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Move", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(move != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(move, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The access key type. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task RegenerateAccessKeyWithHttpMessagesAsync(string resourceGroupName, string workflowName, RegenerateActionParameter keyType, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (keyType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "keyType"); + } + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("keyType", keyType); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "RegenerateAccessKey", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(keyType != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(keyType, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Validates the workflow. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The workflow. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task ValidateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string workflowName, Workflow validate, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (validate == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "validate"); + } + if (validate != null) + { + validate.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("validate", validate); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ValidateByResourceGroup", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(validate != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(validate, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Validates the workflow definition. + /// + /// + /// The resource group name. + /// + /// + /// The workflow location. + /// + /// + /// The workflow name. + /// + /// + /// The workflow definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task ValidateByLocationWithHttpMessagesAsync(string resourceGroupName, string location, string workflowName, Workflow workflow, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (workflow == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflow"); + } + if (workflow != null) + { + workflow.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + + if (location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); + } + + if (workflowName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workflowName"); + } + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("location", location); + tracingParameters.Add("workflowName", workflowName); + + tracingParameters.Add("workflow", workflow); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ValidateByLocation", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{workflowName}", System.Uri.EscapeDataString(workflowName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + if(workflow != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(workflow, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs new file mode 100644 index 000000000000..48607e38e063 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs @@ -0,0 +1,646 @@ +// 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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +namespace Microsoft.Azure.Management.Logic +{ + using Microsoft.Rest.Azure; + using Models; + + /// + /// Extension methods for WorkflowsOperations + /// + public static partial class WorkflowsOperationsExtensions + { + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + public static Microsoft.Rest.Azure.IPage ListBySubscription(this IWorkflowsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowsOperations)operations).ListBySubscriptionAsync(odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this IWorkflowsOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IWorkflowsOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery)) + { + return ((IWorkflowsOperations)operations).ListByResourceGroupAsync(resourceGroupName, odataQuery).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IWorkflowsOperations operations, string resourceGroupName, Microsoft.Rest.Azure.OData.ODataQuery odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, odataQuery, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static Workflow Get(this IWorkflowsOperations operations, string resourceGroupName, string workflowName) + { + return ((IWorkflowsOperations)operations).GetAsync(resourceGroupName, workflowName).GetAwaiter().GetResult(); + } + + /// + /// Gets a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static Workflow CreateOrUpdate(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow workflow) + { + return ((IWorkflowsOperations)operations).CreateOrUpdateAsync(resourceGroupName, workflowName, workflow).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow workflow, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workflowName, workflow, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static Workflow Update(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow workflow) + { + return ((IWorkflowsOperations)operations).UpdateAsync(resourceGroupName, workflowName, workflow).GetAwaiter().GetResult(); + } + + /// + /// Updates a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow workflow, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workflowName, workflow, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void Delete(this IWorkflowsOperations operations, string resourceGroupName, string workflowName) + { + ((IWorkflowsOperations)operations).DeleteAsync(resourceGroupName, workflowName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Disables a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void Disable(this IWorkflowsOperations operations, string resourceGroupName, string workflowName) + { + ((IWorkflowsOperations)operations).DisableAsync(resourceGroupName, workflowName).GetAwaiter().GetResult(); + } + + /// + /// Disables a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DisableAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DisableWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Enables a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void Enable(this IWorkflowsOperations operations, string resourceGroupName, string workflowName) + { + ((IWorkflowsOperations)operations).EnableAsync(resourceGroupName, workflowName).GetAwaiter().GetResult(); + } + + /// + /// Enables a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task EnableAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.EnableWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Generates the upgraded definition for a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static object GenerateUpgradedDefinition(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GenerateUpgradedDefinitionParameters parameters) + { + return ((IWorkflowsOperations)operations).GenerateUpgradedDefinitionAsync(resourceGroupName, workflowName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Generates the upgraded definition for a workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GenerateUpgradedDefinitionAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GenerateUpgradedDefinitionParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GenerateUpgradedDefinitionWithHttpMessagesAsync(resourceGroupName, workflowName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get the workflow callback Url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static WorkflowTriggerCallbackUrl ListCallbackUrl(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl) + { + return ((IWorkflowsOperations)operations).ListCallbackUrlAsync(resourceGroupName, workflowName, listCallbackUrl).GetAwaiter().GetResult(); + } + + /// + /// Get the workflow callback Url. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListCallbackUrlAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, GetCallbackUrlParameters listCallbackUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListCallbackUrlWithHttpMessagesAsync(resourceGroupName, workflowName, listCallbackUrl, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets an OpenAPI definition for the workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static object ListSwagger(this IWorkflowsOperations operations, string resourceGroupName, string workflowName) + { + return ((IWorkflowsOperations)operations).ListSwaggerAsync(resourceGroupName, workflowName).GetAwaiter().GetResult(); + } + + /// + /// Gets an OpenAPI definition for the workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListSwaggerAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListSwaggerWithHttpMessagesAsync(resourceGroupName, workflowName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Moves an existing workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void Move(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow move) + { + ((IWorkflowsOperations)operations).MoveAsync(resourceGroupName, workflowName, move).GetAwaiter().GetResult(); + } + + /// + /// Moves an existing workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MoveAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow move, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.MoveWithHttpMessagesAsync(resourceGroupName, workflowName, move, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void RegenerateAccessKey(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, RegenerateActionParameter keyType) + { + ((IWorkflowsOperations)operations).RegenerateAccessKeyAsync(resourceGroupName, workflowName, keyType).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RegenerateAccessKeyAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, RegenerateActionParameter keyType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.RegenerateAccessKeyWithHttpMessagesAsync(resourceGroupName, workflowName, keyType, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates the workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + public static void ValidateByResourceGroup(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow validate) + { + ((IWorkflowsOperations)operations).ValidateByResourceGroupAsync(resourceGroupName, workflowName, validate).GetAwaiter().GetResult(); + } + + /// + /// Validates the workflow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateByResourceGroupAsync(this IWorkflowsOperations operations, string resourceGroupName, string workflowName, Workflow validate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ValidateByResourceGroupWithHttpMessagesAsync(resourceGroupName, workflowName, validate, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Validates the workflow definition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow location. + /// + /// + /// The workflow name. + /// + public static void ValidateByLocation(this IWorkflowsOperations operations, string resourceGroupName, string location, string workflowName, Workflow workflow) + { + ((IWorkflowsOperations)operations).ValidateByLocationAsync(resourceGroupName, location, workflowName, workflow).GetAwaiter().GetResult(); + } + + /// + /// Validates the workflow definition. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The workflow location. + /// + /// + /// The workflow name. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ValidateByLocationAsync(this IWorkflowsOperations operations, string resourceGroupName, string location, string workflowName, Workflow workflow, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.ValidateByLocationWithHttpMessagesAsync(resourceGroupName, location, workflowName, workflow, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this IWorkflowsOperations operations, string nextPageLink) + { + return ((IWorkflowsOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflows by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListBySubscriptionNextAsync(this IWorkflowsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IWorkflowsOperations operations, string nextPageLink) + { + return ((IWorkflowsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of workflows by resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IWorkflowsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/LogicApp/LogicApp.Management.Sdk/LogicApp.Management.Sdk.csproj b/src/LogicApp/LogicApp.Management.Sdk/LogicApp.Management.Sdk.csproj new file mode 100644 index 000000000000..105edb0903c4 --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/LogicApp.Management.Sdk.csproj @@ -0,0 +1,13 @@ + + + LogicApp + + + + netstandard2.0 + Microsoft.Azure.PowerShell.LogicApp.Management.Sdk + Microsoft.Azure.Management.LogicApp + $(NoWarn);CS0108;CS1573 + + + \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Management.Sdk/README.md b/src/LogicApp/LogicApp.Management.Sdk/README.md new file mode 100644 index 000000000000..dacd8ea67b8d --- /dev/null +++ b/src/LogicApp/LogicApp.Management.Sdk/README.md @@ -0,0 +1,53 @@ +# Overall +This directory contains management plane service clients of Az.LogicApp module. + +## Run Generation +In this directory, run AutoRest: +``` +autorest --reset +autorest --use:@autorest/powershell@4.x +``` + +### AutoRest Configuration +> see https://aka.ms/autorest +``` yaml +isSdkGenerator: true +powershell: true +title: LogicManagementClient +openapi-type: arm +clear-output-folder: true +reflect-api-versions: true +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +``` + +### +``` yaml +commit: 5c9d5f957d76d9fea9c513f494660c6c5d3e809a +input-file: + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/logic/resource-manager/Microsoft.Logic/preview/2018-07-01-preview/logic.json + +output-folder: Generated + +namespace: Microsoft.Azure.Management.Logic + +directive: + - where: + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces"].post.responses["200"].schema + suppress: + - CollectionObjectPropertiesNaming + - where: + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces"].post.responses["200"].schema + suppress: + - CollectionObjectPropertiesNaming + - suppress: R3016 + reason: Existing properties, can't be changed without breaking API. + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run"].post.responses.default.schema["$ref"] + transform: return "#/definitions/ErrorResponse" + - where: + model-name: PartnerContent + property-name: B2B + set: + property-name: B2b +``` \ No newline at end of file diff --git a/src/LogicApp/LogicApp.Test/LogicApp.Test.csproj b/src/LogicApp/LogicApp.Test/LogicApp.Test.csproj index 98e8b70dcd63..b2be539f9358 100644 --- a/src/LogicApp/LogicApp.Test/LogicApp.Test.csproj +++ b/src/LogicApp/LogicApp.Test/LogicApp.Test.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/LogicApp/LogicApp.sln b/src/LogicApp/LogicApp.sln index 3673309edbd0..4ba81cc0fb65 100644 --- a/src/LogicApp/LogicApp.sln +++ b/src/LogicApp/LogicApp.sln @@ -25,14 +25,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogicApp", "LogicApp\LogicA EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFx", "..\..\tools\TestFx\TestFx.csproj", "{DBEF5E9C-B063-4B1B-998F-100019DF688C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogicApp.Management.Sdk", "LogicApp.Management.Sdk\LogicApp.Management.Sdk.csproj", "{E5078F23-6EBE-4C66-B1E1-E1464D599A13}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {DC349CA2-E164-4641-81D9-05C9E4891826}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC349CA2-E164-4641-81D9-05C9E4891826}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -70,6 +69,13 @@ Global {DBEF5E9C-B063-4B1B-998F-100019DF688C}.Debug|Any CPU.Build.0 = Debug|Any CPU {DBEF5E9C-B063-4B1B-998F-100019DF688C}.Release|Any CPU.ActiveCfg = Release|Any CPU {DBEF5E9C-B063-4B1B-998F-100019DF688C}.Release|Any CPU.Build.0 = Release|Any CPU + {E5078F23-6EBE-4C66-B1E1-E1464D599A13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5078F23-6EBE-4C66-B1E1-E1464D599A13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5078F23-6EBE-4C66-B1E1-E1464D599A13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5078F23-6EBE-4C66-B1E1-E1464D599A13}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {DC349CA2-E164-4641-81D9-05C9E4891826} = {2D56D168-0235-4851-934B-EA9A140AB32A} diff --git a/src/LogicApp/LogicApp/Az.LogicApp.psd1 b/src/LogicApp/LogicApp/Az.LogicApp.psd1 index 9c821ccfcbea..2c854e9bc69d 100644 --- a/src/LogicApp/LogicApp/Az.LogicApp.psd1 +++ b/src/LogicApp/LogicApp/Az.LogicApp.psd1 @@ -56,7 +56,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.16.0'; }) # Assemblies that must be loaded prior to importing this module -RequiredAssemblies = 'Microsoft.Azure.Management.Logic.dll' +RequiredAssemblies = 'Microsoft.Azure.PowerShell.LogicApp.Management.Sdk.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() diff --git a/src/LogicApp/LogicApp/ChangeLog.md b/src/LogicApp/LogicApp/ChangeLog.md index 5e1b9e9d0561..bdd68794289a 100644 --- a/src/LogicApp/LogicApp/ChangeLog.md +++ b/src/LogicApp/LogicApp/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Removed "Microsoft.Azure.Management.Logic" Version "4.1.0" PackageReference ## Version 1.5.1 * Removed the *.deps.json file that caused false positive security alerts. [#23603] diff --git a/src/LogicApp/LogicApp/LogicApp.csproj b/src/LogicApp/LogicApp/LogicApp.csproj index 0fdadbf93f15..62962778e518 100644 --- a/src/LogicApp/LogicApp/LogicApp.csproj +++ b/src/LogicApp/LogicApp/LogicApp.csproj @@ -11,7 +11,7 @@ - +