diff --git a/Samples/1c-multiple-input-swaggers/Client/IStorageManagementClient.cs b/Samples/1c-multiple-input-swaggers/Client/IStorageManagementClient.cs
deleted file mode 100644
index d046f3567..000000000
--- a/Samples/1c-multiple-input-swaggers/Client/IStorageManagementClient.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Searchservice
-{
- using Models;
- using Newtonsoft.Json;
-
- ///
- ///
- public partial interface IStorageManagementClient : System.IDisposable
- {
- ///
- /// The base URI of the service.
- ///
- System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- JsonSerializerSettings SerializationSettings { get; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- JsonSerializerSettings DeserializationSettings { get; }
-
- ///
- /// Subscription credentials which uniquely identify the Microsoft
- /// Azure subscription. The subscription ID forms part of the URI for
- /// every service call.
- ///
- string SubscriptionId { get; set; }
-
-
- ///
- /// Gets the IDataSources.
- ///
- IDataSources DataSources { get; }
-
- ///
- /// Gets the IIndexers.
- ///
- IIndexers Indexers { get; }
-
- ///
- /// Gets the IIndexes.
- ///
- IIndexes Indexes { get; }
-
- ///
- /// Gets the IStorageAccounts.
- ///
- IStorageAccounts StorageAccounts { get; }
-
- ///
- /// Gets the IUsageOperations.
- ///
- IUsageOperations Usage { get; }
-
- }
-}
diff --git a/Samples/1c-multiple-input-swaggers/Client/StorageManagementClient.cs b/Samples/1c-multiple-input-swaggers/Client/StorageManagementClient.cs
deleted file mode 100644
index ecf6212af..000000000
--- a/Samples/1c-multiple-input-swaggers/Client/StorageManagementClient.cs
+++ /dev/null
@@ -1,186 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Searchservice
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Net;
- using System.Net.Http;
-
- public partial class StorageManagementClient : ServiceClient, IStorageManagementClient
- {
- ///
- /// The base URI of the service.
- ///
- public System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- public JsonSerializerSettings SerializationSettings { get; private set; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- public JsonSerializerSettings DeserializationSettings { get; private set; }
-
- ///
- /// Subscription credentials which uniquely identify the Microsoft Azure
- /// subscription. The subscription ID forms part of the URI for every service
- /// call.
- ///
- public string SubscriptionId { get; set; }
-
- ///
- /// Gets the IDataSources.
- ///
- public virtual IDataSources DataSources { get; private set; }
-
- ///
- /// Gets the IIndexers.
- ///
- public virtual IIndexers Indexers { get; private set; }
-
- ///
- /// Gets the IIndexes.
- ///
- public virtual IIndexes Indexes { get; private set; }
-
- ///
- /// Gets the IStorageAccounts.
- ///
- public virtual IStorageAccounts StorageAccounts { get; private set; }
-
- ///
- /// Gets the IUsageOperations.
- ///
- public virtual IUsageOperations Usage { get; private set; }
-
- ///
- /// Initializes a new instance of the StorageManagementClient class.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- public StorageManagementClient(params DelegatingHandler[] handlers) : base(handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the StorageManagementClient class.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- public StorageManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the StorageManagementClient 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
- ///
- public StorageManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the StorageManagementClient 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
- ///
- public StorageManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// An optional partial-method to perform custom initialization.
- ///
- partial void CustomInitialize();
- ///
- /// Initializes client properties.
- ///
- private void Initialize()
- {
- DataSources = new DataSources(this);
- Indexers = new Indexers(this);
- Indexes = new Indexes(this);
- StorageAccounts = new StorageAccounts(this);
- Usage = new UsageOperations(this);
- BaseUri = new System.Uri("https://management.azure.com");
- SerializationSettings = new 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 ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- SerializationSettings.Converters.Add(new TransformationJsonConverter());
- DeserializationSettings = new JsonSerializerSettings
- {
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type"));
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("@odata.type"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("@odata.type"));
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type"));
- CustomInitialize();
- DeserializationSettings.Converters.Add(new TransformationJsonConverter());
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayAvailableWafRuleSetsResult.cs b/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayAvailableWafRuleSetsResult.cs
deleted file mode 100644
index ea774ed8e..000000000
--- a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayAvailableWafRuleSetsResult.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Response for ApplicationGatewayAvailableWafRuleSets API service call.
- ///
- public partial class ApplicationGatewayAvailableWafRuleSetsResult
- {
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayAvailableWafRuleSetsResult class.
- ///
- public ApplicationGatewayAvailableWafRuleSetsResult()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayAvailableWafRuleSetsResult class.
- ///
- /// The list of application gateway rule
- /// sets.
- public ApplicationGatewayAvailableWafRuleSetsResult(IList value = default(IList))
- {
- Value = value;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the list of application gateway rule sets.
- ///
- [JsonProperty(PropertyName = "value")]
- public IList Value { get; set; }
-
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallDisabledRuleGroup.cs b/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallDisabledRuleGroup.cs
deleted file mode 100644
index 6dea8b92f..000000000
--- a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallDisabledRuleGroup.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Allows to disable rules within a rule group or an entire rule group.
- ///
- public partial class ApplicationGatewayFirewallDisabledRuleGroup
- {
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayFirewallDisabledRuleGroup class.
- ///
- public ApplicationGatewayFirewallDisabledRuleGroup()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayFirewallDisabledRuleGroup class.
- ///
- /// The name of the rule group that will be
- /// disabled.
- /// The list of rules that will be disabled. If
- /// null, all rules of the rule group will be disabled.
- public ApplicationGatewayFirewallDisabledRuleGroup(string ruleGroupName, IList rules = default(IList))
- {
- RuleGroupName = ruleGroupName;
- Rules = rules;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the name of the rule group that will be disabled.
- ///
- [JsonProperty(PropertyName = "ruleGroupName")]
- public string RuleGroupName { get; set; }
-
- ///
- /// Gets or sets the list of rules that will be disabled. If null, all
- /// rules of the rule group will be disabled.
- ///
- [JsonProperty(PropertyName = "rules")]
- public IList Rules { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleGroupName");
- }
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRule.cs b/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRule.cs
deleted file mode 100644
index a6c6200db..000000000
--- a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRule.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// A web application firewall rule.
- ///
- public partial class ApplicationGatewayFirewallRule
- {
- ///
- /// Initializes a new instance of the ApplicationGatewayFirewallRule
- /// class.
- ///
- public ApplicationGatewayFirewallRule()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ApplicationGatewayFirewallRule
- /// class.
- ///
- /// The identifier of the web application firewall
- /// rule.
- /// The description of the web application
- /// firewall rule.
- public ApplicationGatewayFirewallRule(int ruleId, string description = default(string))
- {
- RuleId = ruleId;
- Description = description;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the identifier of the web application firewall rule.
- ///
- [JsonProperty(PropertyName = "ruleId")]
- public int RuleId { get; set; }
-
- ///
- /// Gets or sets the description of the web application firewall rule.
- ///
- [JsonProperty(PropertyName = "description")]
- public string Description { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- //Nothing to validate
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleGroup.cs b/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleGroup.cs
deleted file mode 100644
index fc753b83f..000000000
--- a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleGroup.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// A web application firewall rule group.
- ///
- public partial class ApplicationGatewayFirewallRuleGroup
- {
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayFirewallRuleGroup class.
- ///
- public ApplicationGatewayFirewallRuleGroup()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// ApplicationGatewayFirewallRuleGroup class.
- ///
- /// The name of the web application
- /// firewall rule group.
- /// The rules of the web application firewall rule
- /// group.
- /// The description of the web application
- /// firewall rule group.
- public ApplicationGatewayFirewallRuleGroup(string ruleGroupName, IList rules, string description = default(string))
- {
- RuleGroupName = ruleGroupName;
- Description = description;
- Rules = rules;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the name of the web application firewall rule group.
- ///
- [JsonProperty(PropertyName = "ruleGroupName")]
- public string RuleGroupName { get; set; }
-
- ///
- /// Gets or sets the description of the web application firewall rule
- /// group.
- ///
- [JsonProperty(PropertyName = "description")]
- public string Description { get; set; }
-
- ///
- /// Gets or sets the rules of the web application firewall rule group.
- ///
- [JsonProperty(PropertyName = "rules")]
- public IList Rules { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleGroupName");
- }
- if (Rules == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "Rules");
- }
- if (Rules != null)
- {
- foreach (var element in Rules)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleSet.cs b/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleSet.cs
deleted file mode 100644
index 9703a0e28..000000000
--- a/Samples/test/end-to-end/network/Client/Models/ApplicationGatewayFirewallRuleSet.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// A web application firewall rule set.
- ///
- [JsonTransformation]
- public partial class ApplicationGatewayFirewallRuleSet : Resource
- {
- ///
- /// Initializes a new instance of the ApplicationGatewayFirewallRuleSet
- /// class.
- ///
- public ApplicationGatewayFirewallRuleSet()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ApplicationGatewayFirewallRuleSet
- /// class.
- ///
- /// The type of the web application firewall
- /// rule set.
- /// The version of the web application
- /// firewall rule set type.
- /// The rule groups of the web application
- /// firewall rule set.
- /// Resource ID.
- /// Resource name.
- /// Resource type.
- /// Resource location.
- /// Resource tags.
- /// The provisioning state of the web
- /// application firewall rule set.
- public ApplicationGatewayFirewallRuleSet(string ruleSetType, string ruleSetVersion, IList ruleGroups, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string))
- : base(id, name, type, location, tags)
- {
- ProvisioningState = provisioningState;
- RuleSetType = ruleSetType;
- RuleSetVersion = ruleSetVersion;
- RuleGroups = ruleGroups;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the provisioning state of the web application firewall
- /// rule set.
- ///
- [JsonProperty(PropertyName = "properties.provisioningState")]
- public string ProvisioningState { get; set; }
-
- ///
- /// Gets or sets the type of the web application firewall rule set.
- ///
- [JsonProperty(PropertyName = "properties.ruleSetType")]
- public string RuleSetType { get; set; }
-
- ///
- /// Gets or sets the version of the web application firewall rule set
- /// type.
- ///
- [JsonProperty(PropertyName = "properties.ruleSetVersion")]
- public string RuleSetVersion { get; set; }
-
- ///
- /// Gets or sets the rule groups of the web application firewall rule
- /// set.
- ///
- [JsonProperty(PropertyName = "properties.ruleGroups")]
- public IList RuleGroups { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (RuleSetType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleSetType");
- }
- if (RuleSetVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleSetVersion");
- }
- if (RuleGroups == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "RuleGroups");
- }
- if (RuleGroups != null)
- {
- foreach (var element in RuleGroups)
- {
- if (element != null)
- {
- element.Validate();
- }
- }
- }
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/DhGroup.cs b/Samples/test/end-to-end/network/Client/Models/DhGroup.cs
deleted file mode 100644
index 8ebba24ee..000000000
--- a/Samples/test/end-to-end/network/Client/Models/DhGroup.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for DhGroup.
- ///
- public static class DhGroup
- {
- public const string None = "None";
- public const string DHGroup1 = "DHGroup1";
- public const string DHGroup2 = "DHGroup2";
- public const string DHGroup14 = "DHGroup14";
- public const string DHGroup2048 = "DHGroup2048";
- public const string ECP256 = "ECP256";
- public const string ECP384 = "ECP384";
- public const string DHGroup24 = "DHGroup24";
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/IkeEncryption.cs b/Samples/test/end-to-end/network/Client/Models/IkeEncryption.cs
deleted file mode 100644
index 788305c95..000000000
--- a/Samples/test/end-to-end/network/Client/Models/IkeEncryption.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for IkeEncryption.
- ///
- public static class IkeEncryption
- {
- public const string DES = "DES";
- public const string DES3 = "DES3";
- public const string AES128 = "AES128";
- public const string AES192 = "AES192";
- public const string AES256 = "AES256";
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/IkeIntegrity.cs b/Samples/test/end-to-end/network/Client/Models/IkeIntegrity.cs
deleted file mode 100644
index 9fa00de46..000000000
--- a/Samples/test/end-to-end/network/Client/Models/IkeIntegrity.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for IkeIntegrity.
- ///
- public static class IkeIntegrity
- {
- public const string MD5 = "MD5";
- public const string SHA1 = "SHA1";
- public const string SHA256 = "SHA256";
- public const string SHA384 = "SHA384";
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/IpsecEncryption.cs b/Samples/test/end-to-end/network/Client/Models/IpsecEncryption.cs
deleted file mode 100644
index 3765252a2..000000000
--- a/Samples/test/end-to-end/network/Client/Models/IpsecEncryption.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for IpsecEncryption.
- ///
- public static class IpsecEncryption
- {
- public const string None = "None";
- public const string DES = "DES";
- public const string DES3 = "DES3";
- public const string AES128 = "AES128";
- public const string AES192 = "AES192";
- public const string AES256 = "AES256";
- public const string GCMAES128 = "GCMAES128";
- public const string GCMAES192 = "GCMAES192";
- public const string GCMAES256 = "GCMAES256";
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/IpsecIntegrity.cs b/Samples/test/end-to-end/network/Client/Models/IpsecIntegrity.cs
deleted file mode 100644
index 70dd73ad4..000000000
--- a/Samples/test/end-to-end/network/Client/Models/IpsecIntegrity.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for IpsecIntegrity.
- ///
- public static class IpsecIntegrity
- {
- public const string MD5 = "MD5";
- public const string SHA1 = "SHA1";
- public const string SHA256 = "SHA256";
- public const string GCMAES128 = "GCMAES128";
- public const string GCMAES192 = "GCMAES192";
- public const string GCMAES256 = "GCMAES256";
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/IpsecPolicy.cs b/Samples/test/end-to-end/network/Client/Models/IpsecPolicy.cs
deleted file mode 100644
index 7f57a2742..000000000
--- a/Samples/test/end-to-end/network/Client/Models/IpsecPolicy.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// An IPSec Policy configuration for a virtual network gateway connection
- ///
- public partial class IpsecPolicy
- {
- ///
- /// Initializes a new instance of the IpsecPolicy class.
- ///
- public IpsecPolicy()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the IpsecPolicy class.
- ///
- /// The IPSec Security Association
- /// (also called Quick Mode or Phase 2 SA) lifetime in seconds for a
- /// site to site VPN tunnel.
- /// The IPSec Security Association
- /// (also called Quick Mode or Phase 2 SA) payload size in KB for a
- /// site to site VPN tunnel.
- /// The IPSec encryption algorithm (IKE
- /// phase 1). Possible values include: 'None', 'DES', 'DES3', 'AES128',
- /// 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'
- /// The IPSec integrity algorithm (IKE
- /// phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256',
- /// 'GCMAES128', 'GCMAES192', 'GCMAES256'
- /// The IKE encryption algorithm (IKE phase
- /// 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192',
- /// 'AES256'
- /// The IKE integrity algorithm (IKE phase
- /// 2). Possible values include: 'MD5', 'SHA1', 'SHA256',
- /// 'SHA384'
- /// The DH Groups used in IKE Phase 1 for initial
- /// SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2',
- /// 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
- /// The DH Groups used in IKE Phase 2 for new
- /// child SA. Possible values include: 'None', 'PFS1', 'PFS2',
- /// 'PFS2048', 'ECP256', 'ECP384', 'PFS24'
- public IpsecPolicy(int saLifeTimeSeconds, int saDataSizeKilobytes, string ipsecEncryption, string ipsecIntegrity, string ikeEncryption, string ikeIntegrity, string dhGroup, string pfsGroup)
- {
- SaLifeTimeSeconds = saLifeTimeSeconds;
- SaDataSizeKilobytes = saDataSizeKilobytes;
- IpsecEncryption = ipsecEncryption;
- IpsecIntegrity = ipsecIntegrity;
- IkeEncryption = ikeEncryption;
- IkeIntegrity = ikeIntegrity;
- DhGroup = dhGroup;
- PfsGroup = pfsGroup;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the IPSec Security Association (also called Quick Mode
- /// or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
- ///
- [JsonProperty(PropertyName = "saLifeTimeSeconds")]
- public int SaLifeTimeSeconds { get; set; }
-
- ///
- /// Gets or sets the IPSec Security Association (also called Quick Mode
- /// or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
- ///
- [JsonProperty(PropertyName = "saDataSizeKilobytes")]
- public int SaDataSizeKilobytes { get; set; }
-
- ///
- /// Gets or sets the IPSec encryption algorithm (IKE phase 1). Possible
- /// values include: 'None', 'DES', 'DES3', 'AES128', 'AES192',
- /// 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256'
- ///
- [JsonProperty(PropertyName = "ipsecEncryption")]
- public string IpsecEncryption { get; set; }
-
- ///
- /// Gets or sets the IPSec integrity algorithm (IKE phase 1). Possible
- /// values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192',
- /// 'GCMAES256'
- ///
- [JsonProperty(PropertyName = "ipsecIntegrity")]
- public string IpsecIntegrity { get; set; }
-
- ///
- /// Gets or sets the IKE encryption algorithm (IKE phase 2). Possible
- /// values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
- ///
- [JsonProperty(PropertyName = "ikeEncryption")]
- public string IkeEncryption { get; set; }
-
- ///
- /// Gets or sets the IKE integrity algorithm (IKE phase 2). Possible
- /// values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
- ///
- [JsonProperty(PropertyName = "ikeIntegrity")]
- public string IkeIntegrity { get; set; }
-
- ///
- /// Gets or sets the DH Groups used in IKE Phase 1 for initial SA.
- /// Possible values include: 'None', 'DHGroup1', 'DHGroup2',
- /// 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
- ///
- [JsonProperty(PropertyName = "dhGroup")]
- public string DhGroup { get; set; }
-
- ///
- /// Gets or sets the DH Groups used in IKE Phase 2 for new child SA.
- /// Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048',
- /// 'ECP256', 'ECP384', 'PFS24'
- ///
- [JsonProperty(PropertyName = "pfsGroup")]
- public string PfsGroup { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (IpsecEncryption == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "IpsecEncryption");
- }
- if (IpsecIntegrity == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "IpsecIntegrity");
- }
- if (IkeEncryption == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "IkeEncryption");
- }
- if (IkeIntegrity == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "IkeIntegrity");
- }
- if (DhGroup == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "DhGroup");
- }
- if (PfsGroup == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "PfsGroup");
- }
- }
- }
-}
diff --git a/Samples/test/end-to-end/network/Client/Models/PfsGroup.cs b/Samples/test/end-to-end/network/Client/Models/PfsGroup.cs
deleted file mode 100644
index 6d5dc9efa..000000000
--- a/Samples/test/end-to-end/network/Client/Models/PfsGroup.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace applicationGateway.Models
-{
-
- ///
- /// Defines values for PfsGroup.
- ///
- public static class PfsGroup
- {
- public const string None = "None";
- public const string PFS1 = "PFS1";
- public const string PFS2 = "PFS2";
- public const string PFS2048 = "PFS2048";
- public const string ECP256 = "ECP256";
- public const string ECP384 = "ECP384";
- public const string PFS24 = "PFS24";
- }
-}
diff --git a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOps.cs b/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOps.cs
deleted file mode 100644
index c189dae78..000000000
--- a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOps.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace tiny
-{
- using Microsoft.Rest;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// CowbellOps operations.
- ///
- public partial class CowbellOps : IServiceOperations, ICowbellOps
- {
- ///
- /// Initializes a new instance of the CowbellOps class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public CowbellOps(CowbellFactory client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the CowbellFactory
- ///
- public CowbellFactory Client { get; private set; }
-
- ///
- /// A good description.
- ///
- ///
- ///
- ///
- /// 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 Task AddWithHttpMessagesAsync(string body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (body == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "body");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("body", body);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Add", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "cowbell").ToString();
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
-
-
- 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(body != null)
- {
- _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- }
- else {
- _responseContent = string.Empty;
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new HttpOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOpsExtensions.cs b/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOpsExtensions.cs
deleted file mode 100644
index 0226fae6d..000000000
--- a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/CowbellOpsExtensions.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace tiny
-{
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for CowbellOps.
- ///
- public static partial class CowbellOpsExtensions
- {
- ///
- /// A good description.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- public static void Add(this ICowbellOps operations, string body)
- {
- operations.AddAsync(body).GetAwaiter().GetResult();
- }
-
- ///
- /// A good description.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task AddAsync(this ICowbellOps operations, string body, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.AddWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- }
-}
diff --git a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/ICowbellOps.cs b/Samples/test/error-behavior/openapi-yaml-bad-type/Client/ICowbellOps.cs
deleted file mode 100644
index ccd3ceaed..000000000
--- a/Samples/test/error-behavior/openapi-yaml-bad-type/Client/ICowbellOps.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace tiny
-{
- using Microsoft.Rest;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// CowbellOps operations.
- ///
- public partial interface ICowbellOps
- {
- ///
- /// A good description.
- ///
- ///
- ///
- ///
- /// The 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
- ///
- Task AddWithHttpMessagesAsync(string body, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/CowbellModerator.cs b/Samples/test/stream-with-content-type/Client/CowbellModerator.cs
deleted file mode 100644
index de0d80434..000000000
--- a/Samples/test/stream-with-content-type/Client/CowbellModerator.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Net;
- using System.Net.Http;
-
- public partial class CowbellModerator : ServiceClient, ICowbellModerator
- {
- ///
- /// The base URI of the service.
- ///
- public System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- public JsonSerializerSettings SerializationSettings { get; private set; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- public JsonSerializerSettings DeserializationSettings { get; private set; }
-
- ///
- /// Gets the IImage.
- ///
- public virtual IImage Image { get; private set; }
-
- ///
- /// Initializes a new instance of the CowbellModerator class.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- public CowbellModerator(params DelegatingHandler[] handlers) : base(handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the CowbellModerator class.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- public CowbellModerator(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the CowbellModerator 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
- ///
- public CowbellModerator(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the CowbellModerator 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
- ///
- public CowbellModerator(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// An optional partial-method to perform custom initialization.
- ///
- partial void CustomInitialize();
- ///
- /// Initializes client properties.
- ///
- private void Initialize()
- {
- Image = new Image(this);
- BaseUri = new System.Uri("https://localhost");
- SerializationSettings = new 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 ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- DeserializationSettings = new JsonSerializerSettings
- {
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- CustomInitialize();
- }
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/ICowbellModerator.cs b/Samples/test/stream-with-content-type/Client/ICowbellModerator.cs
deleted file mode 100644
index a67c03aa7..000000000
--- a/Samples/test/stream-with-content-type/Client/ICowbellModerator.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType
-{
- using Models;
- using Newtonsoft.Json;
-
- ///
- ///
- public partial interface ICowbellModerator : System.IDisposable
- {
- ///
- /// The base URI of the service.
- ///
- System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- JsonSerializerSettings SerializationSettings { get; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- JsonSerializerSettings DeserializationSettings { get; }
-
-
- ///
- /// Gets the IImage.
- ///
- IImage Image { get; }
-
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/IImage.cs b/Samples/test/stream-with-content-type/Client/IImage.cs
deleted file mode 100644
index cf1d8edeb..000000000
--- a/Samples/test/stream-with-content-type/Client/IImage.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType
-{
- using Microsoft.Rest;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Image operations.
- ///
- public partial interface IImage
- {
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include:
- /// 'image/gif', 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// The 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
- ///
- Task AWithHttpMessagesAsync(Stream image, ContentType? imageContentType = default(ContentType?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include:
- /// 'image/gif', 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// The 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
- ///
- Task BWithHttpMessagesAsync(Stream image, ContentType imageContentType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/Image.cs b/Samples/test/stream-with-content-type/Client/Image.cs
deleted file mode 100644
index 9a65b7c28..000000000
--- a/Samples/test/stream-with-content-type/Client/Image.cs
+++ /dev/null
@@ -1,294 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType
-{
- using Microsoft.Rest;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Image operations.
- ///
- public partial class Image : IServiceOperations, IImage
- {
- ///
- /// Initializes a new instance of the Image class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public Image(CowbellModerator client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the CowbellModerator
- ///
- public CowbellModerator Client { get; private set; }
-
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// 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 Task AWithHttpMessagesAsync(Stream image, ContentType? imageContentType = default(ContentType?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (image == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "image");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("image", image);
- tracingParameters.Add("imageContentType", imageContentType);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "A", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "ProcessImage/FunctionA").ToString();
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
-
-
- 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(image == null)
- {
- throw new System.ArgumentNullException("image");
- }
- if (image != null && image != Stream.Null)
- {
- _httpRequest.Content = new StreamContent(image);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(imageContentType.ToSerializedValue());
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- }
- else {
- _responseContent = string.Empty;
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new HttpOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// 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 Task BWithHttpMessagesAsync(Stream image, ContentType imageContentType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (image == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "image");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("image", image);
- tracingParameters.Add("imageContentType", imageContentType);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "B", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "ProcessImage/FunctionB").ToString();
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
-
-
- 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(image == null)
- {
- throw new System.ArgumentNullException("image");
- }
- if (image != null && image != Stream.Null)
- {
- _httpRequest.Content = new StreamContent(image);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse(imageContentType.ToSerializedValue());
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- }
- else {
- _responseContent = string.Empty;
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new HttpOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/ImageExtensions.cs b/Samples/test/stream-with-content-type/Client/ImageExtensions.cs
deleted file mode 100644
index 693ae52d7..000000000
--- a/Samples/test/stream-with-content-type/Client/ImageExtensions.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType
-{
- using Models;
- using System.IO;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for Image.
- ///
- public static partial class ImageExtensions
- {
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- public static void A(this IImage operations, Stream image, ContentType? imageContentType = default(ContentType?))
- {
- operations.AAsync(image, imageContentType).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task AAsync(this IImage operations, Stream image, ContentType? imageContentType = default(ContentType?), CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.AWithHttpMessagesAsync(image, imageContentType, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- public static void B(this IImage operations, Stream image, ContentType imageContentType)
- {
- operations.BAsync(image, imageContentType).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// An image stream.
- ///
- ///
- /// The content type of the image. Possible values include: 'image/gif',
- /// 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff'
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BAsync(this IImage operations, Stream image, ContentType imageContentType, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BWithHttpMessagesAsync(image, imageContentType, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- }
-}
diff --git a/Samples/test/stream-with-content-type/Client/Models/ContentType.cs b/Samples/test/stream-with-content-type/Client/Models/ContentType.cs
deleted file mode 100644
index bcd6cca9f..000000000
--- a/Samples/test/stream-with-content-type/Client/Models/ContentType.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace StreamWithContentType.Models
-{
- using Newtonsoft.Json;
- using Newtonsoft.Json.Converters;
- using System.Runtime;
- using System.Runtime.Serialization;
-
- ///
- /// Defines values for ContentType.
- ///
- [JsonConverter(typeof(StringEnumConverter))]
- public enum ContentType
- {
- [EnumMember(Value = "image/gif")]
- ImageGif,
- [EnumMember(Value = "image/jpeg")]
- ImageJpeg,
- [EnumMember(Value = "image/png")]
- ImagePng,
- [EnumMember(Value = "image/bmp")]
- ImageBmp,
- [EnumMember(Value = "image/tiff")]
- ImageTiff
- }
- internal static class ContentTypeEnumExtension
- {
- internal static string ToSerializedValue(this ContentType? value ) =>
- value == null ? null : (( ContentType )value).ToSerializedValue();
-
- internal static string ToSerializedValue(this ContentType value )
- {
- switch( value )
- {
- case ContentType.ImageGif:
- return "image/gif";
- case ContentType.ImageJpeg:
- return "image/jpeg";
- case ContentType.ImagePng:
- return "image/png";
- case ContentType.ImageBmp:
- return "image/bmp";
- case ContentType.ImageTiff:
- return "image/tiff";
- }
- return null;
- }
-
- internal static ContentType? ParseContentType( this string value )
- {
- switch( value )
- {
- case "image/gif":
- return ContentType.ImageGif;
- case "image/jpeg":
- return ContentType.ImageJpeg;
- case "image/png":
- return ContentType.ImagePng;
- case "image/bmp":
- return ContentType.ImageBmp;
- case "image/tiff":
- return ContentType.ImageTiff; }
- return null;
- }
- }
-}
diff --git a/src/core/AutoRest.Core/Model/Method.cs b/src/core/AutoRest.Core/Model/Method.cs
index 8530a0985..d6ad89683 100644
--- a/src/core/AutoRest.Core/Model/Method.cs
+++ b/src/core/AutoRest.Core/Model/Method.cs
@@ -231,21 +231,6 @@ namespace AutoRest.Core.Model
///
public bool Hidden { get; set; }
- ///
- /// Determines whether the specified method is structurally equal to this object.
- ///
- /// The object to compare with this object.
- public bool StructurallyEquals(Method other)
- {
- if (other == null)
- {
- return false;
- }
- return ReturnType.StructurallyEquals(other.ReturnType)
- && Name.Equals(other.Name)
- && Parameters.SequenceEqual(other.Parameters, new Utilities.EqualityComparer((a, b) => a.StructurallyEquals(b)));
- }
-
[JsonIgnore]
public IEnumerable MyReservedNames => Name.Value.SingleItemAsEnumerable();
diff --git a/src/core/AutoRest.Core/Model/Parameter.cs b/src/core/AutoRest.Core/Model/Parameter.cs
index 4a023579c..e783a60a0 100644
--- a/src/core/AutoRest.Core/Model/Parameter.cs
+++ b/src/core/AutoRest.Core/Model/Parameter.cs
@@ -68,20 +68,6 @@ namespace AutoRest.Core.Model
///
public virtual ParameterLocation Location { get; set; }
- ///
- /// Determines whether the specified parameter is structurally equal to this object.
- ///
- /// The object to compare with this object.
- public bool StructurallyEquals(Parameter other)
- {
- if (other == null)
- {
- return false;
- }
- return ModelType.StructurallyEquals(other.ModelType)
- && Name.Equals(other.Name);
- }
-
[JsonIgnore]
public override IParent Parent
{
diff --git a/src/core/AutoRest.Core/Model/Response.cs b/src/core/AutoRest.Core/Model/Response.cs
index 333afdde9..b7199c359 100644
--- a/src/core/AutoRest.Core/Model/Response.cs
+++ b/src/core/AutoRest.Core/Model/Response.cs
@@ -37,19 +37,6 @@ namespace AutoRest.Core.Model
///
public IModelType Headers { get; set; }
- ///
- /// Determines whether the specified response is structurally equal to this object.
- ///
- /// The object to compare with this object.
- public bool StructurallyEquals(Response other)
- {
- if (other == null)
- {
- return false;
- }
- return (Body == null ? other.Body == null : Body.StructurallyEquals(other.Body))
- && (Headers == null ? other.Headers == null : Headers.StructurallyEquals(other.Headers));
- }
public Dictionary Extensions { get; set; } = new Dictionary();
public bool IsNullable => Extensions?.Get("x-nullable") ?? true;
diff --git a/src/gulp_modules/regeneration.iced b/src/gulp_modules/regeneration.iced
index a76db29bb..c5d1d7dfd 100644
--- a/src/gulp_modules/regeneration.iced
+++ b/src/gulp_modules/regeneration.iced
@@ -682,12 +682,16 @@ task 'regenerate-delete', '', (done)->
'src/generator/AutoRest.Python.Tests/Expected'
'src/generator/AutoRest.Python.Azure.Tests/Expected'
'src/generator/AutoRest.AzureResourceSchema.Tests/Resource/Expected'
- source 'Samples/*/**/'
+ rmQueue = [] # buffered, since piped removal will cause `source` to fail midway (ENOENT)
+ source 'Samples/*/*/**/'
.pipe foreach (each, next) ->
configFile = path.join(each.path, "../readme.md")
- console.log "rm -rf #{each.path}" if fs.existsSync configFile
- rm "-rf", '#{each.path}' if fs.existsSync configFile
+ rmQueue.push each.path if fs.existsSync configFile
next null
+ .on 'end', ->
+ for folder in rmQueue
+ console.log "rm -rf #{folder}"
+ rm "-rf", "#{folder}"
task 'autorest-preview-build', '', ->
exec "dotnet build #{basefolder}/src/dev/AutoRest.Preview/"