//------------------------------------------------------------------------------
// <auto-generated>
//     Este código fue generado por una herramienta.
//
//     Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
//     se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------

[assembly: System.Runtime.Serialization.ContractNamespaceAttribute("http://tempuri.org/", ClrNamespace="tempuri.org")]

namespace tempuri.org
{
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Pedido", Namespace="http://tempuri.org/")]
    public partial class Pedido : object
    {
        
        private int sale_order_idField;
        
        private tempuri.org.Items[] itemsField;
        
        private string tracking_numberField;
        
        private string trackingField;
        
        private string carrierField;
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public int sale_order_id
        {
            get
            {
                return this.sale_order_idField;
            }
            set
            {
                this.sale_order_idField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public tempuri.org.Items[] items
        {
            get
            {
                return this.itemsField;
            }
            set
            {
                this.itemsField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=2)]
        public string tracking_number
        {
            get
            {
                return this.tracking_numberField;
            }
            set
            {
                this.tracking_numberField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=3)]
        public string tracking
        {
            get
            {
                return this.trackingField;
            }
            set
            {
                this.trackingField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=4)]
        public string carrier
        {
            get
            {
                return this.carrierField;
            }
            set
            {
                this.carrierField = value;
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Items", Namespace="http://tempuri.org/")]
    public partial class Items : object
    {
        
        private string skuField;
        
        private int quantityField;
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
        public string sku
        {
            get
            {
                return this.skuField;
            }
            set
            {
                this.skuField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true, Order=1)]
        public int quantity
        {
            get
            {
                return this.quantityField;
            }
            set
            {
                this.quantityField = value;
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Response", Namespace="http://tempuri.org/")]
    public partial class Response : object
    {
        
        private int idField;
        
        private string descriptionField;
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public int id
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
        public string description
        {
            get
            {
                return this.descriptionField;
            }
            set
            {
                this.descriptionField = value;
            }
        }
    }
}


[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ImportarPedidosSoap")]
public interface ImportarPedidosSoap
{
    
    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/InsertarPedidos", ReplyAction="*")]
    System.Threading.Tasks.Task<InsertarPedidosResponse> InsertarPedidosAsync(InsertarPedidosRequest request);
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class InsertarPedidosRequest
{
    
    [System.ServiceModel.MessageBodyMemberAttribute(Name="InsertarPedidos", Namespace="http://tempuri.org/", Order=0)]
    public InsertarPedidosRequestBody Body;
    
    public InsertarPedidosRequest()
    {
    }
    
    public InsertarPedidosRequest(InsertarPedidosRequestBody Body)
    {
        this.Body = Body;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
public partial class InsertarPedidosRequestBody
{
    
    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
    public tempuri.org.Pedido pedido;
    
    public InsertarPedidosRequestBody()
    {
    }
    
    public InsertarPedidosRequestBody(tempuri.org.Pedido pedido)
    {
        this.pedido = pedido;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class InsertarPedidosResponse
{
    
    [System.ServiceModel.MessageBodyMemberAttribute(Name="InsertarPedidosResponse", Namespace="http://tempuri.org/", Order=0)]
    public InsertarPedidosResponseBody Body;
    
    public InsertarPedidosResponse()
    {
    }
    
    public InsertarPedidosResponse(InsertarPedidosResponseBody Body)
    {
        this.Body = Body;
    }
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
public partial class InsertarPedidosResponseBody
{
    
    [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
    public tempuri.org.Response InsertarPedidosResult;
    
    public InsertarPedidosResponseBody()
    {
    }
    
    public InsertarPedidosResponseBody(tempuri.org.Response InsertarPedidosResult)
    {
        this.InsertarPedidosResult = InsertarPedidosResult;
    }
}

[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
public interface ImportarPedidosSoapChannel : ImportarPedidosSoap, System.ServiceModel.IClientChannel
{
}

[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview2.21264.1")]
public partial class ImportarPedidosSoapClient : System.ServiceModel.ClientBase<ImportarPedidosSoap>, ImportarPedidosSoap
{
    
    /// <summary>
    /// Implemente este método parcial para configurar el punto de conexión de servicio.
    /// </summary>
    /// <param name="serviceEndpoint">El punto de conexión para configurar</param>
    /// <param name="clientCredentials">Credenciales de cliente</param>
    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
    
    public ImportarPedidosSoapClient(EndpointConfiguration endpointConfiguration) : 
            base(ImportarPedidosSoapClient.GetBindingForEndpoint(endpointConfiguration), ImportarPedidosSoapClient.GetEndpointAddress(endpointConfiguration))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public ImportarPedidosSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
            base(ImportarPedidosSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public ImportarPedidosSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(ImportarPedidosSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }
    
    public ImportarPedidosSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
            base(binding, remoteAddress)
    {
    }
    
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    System.Threading.Tasks.Task<InsertarPedidosResponse> ImportarPedidosSoap.InsertarPedidosAsync(InsertarPedidosRequest request)
    {
        return base.Channel.InsertarPedidosAsync(request);
    }
    
    public System.Threading.Tasks.Task<InsertarPedidosResponse> InsertarPedidosAsync(tempuri.org.Pedido pedido)
    {
        InsertarPedidosRequest inValue = new InsertarPedidosRequest();
        inValue.Body = new InsertarPedidosRequestBody();
        inValue.Body.pedido = pedido;
        return ((ImportarPedidosSoap)(this)).InsertarPedidosAsync(inValue);
    }
    
    public virtual System.Threading.Tasks.Task OpenAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
    }
    
    public virtual System.Threading.Tasks.Task CloseAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
    }
    
    private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.ImportarPedidosSoap))
        {
            System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
            result.MaxBufferSize = int.MaxValue;
            result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
            result.MaxReceivedMessageSize = int.MaxValue;
            result.AllowCookies = true;
            return result;
        }
        if ((endpointConfiguration == EndpointConfiguration.ImportarPedidosSoap12))
        {
            System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
            System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
            textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
            result.Elements.Add(textBindingElement);
            System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
            httpBindingElement.AllowCookies = true;
            httpBindingElement.MaxBufferSize = int.MaxValue;
            httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
            result.Elements.Add(httpBindingElement);
            return result;
        }
        throw new System.InvalidOperationException(string.Format("No se pudo encontrar un punto de conexión con el nombre \"{0}\".", endpointConfiguration));
    }
    
    private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.ImportarPedidosSoap))
        {
            return new System.ServiceModel.EndpointAddress("http://200.77.50.90/wspedidosscmercadazo/importarpedidos.asmx");
        }
        if ((endpointConfiguration == EndpointConfiguration.ImportarPedidosSoap12))
        {
            return new System.ServiceModel.EndpointAddress("http://200.77.50.90/wspedidosscmercadazo/importarpedidos.asmx");
        }
        throw new System.InvalidOperationException(string.Format("No se pudo encontrar un punto de conexión con el nombre \"{0}\".", endpointConfiguration));
    }
    
    public enum EndpointConfiguration
    {
        
        ImportarPedidosSoap,
        
        ImportarPedidosSoap12,
    }
}
