//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.17929.
// 
#pragma warning disable 1591

namespace PrintableResultsSampleCodeCS.PrintableResultsWebService {
    using System;
    using System.Web.Services;
    using System.Diagnostics;
    using System.Web.Services.Protocols;
    using System.Xml.Serialization;
    using System.ComponentModel;
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="PrintableResultsServicePort", Namespace="http://medplus.com/resultsHub/observations")]
    [System.Xml.Serialization.SoapIncludeAttribute(typeof(ProviderAccount))]
    public partial class PrintableResultsService : System.Web.Services.Protocols.SoapHttpClientProtocol {
        
        private System.Threading.SendOrPostCallback getProviderAccountsOperationCompleted;
        
        private System.Threading.SendOrPostCallback getResultsOperationCompleted;
        
        private System.Threading.SendOrPostCallback getMoreResultsOperationCompleted;
        
        private System.Threading.SendOrPostCallback acknowledgeResultsOperationCompleted;
        
        private bool useDefaultCredentialsSetExplicitly;
        
        /// <remarks/>
        public PrintableResultsService() {
            this.Url = "https://shubservices.questemr.com:443/resultsHub/observations/printable";
            if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
                this.UseDefaultCredentials = true;
                this.useDefaultCredentialsSetExplicitly = false;
            }
            else {
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        public new string Url {
            get {
                return base.Url;
            }
            set {
                if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                            && (this.useDefaultCredentialsSetExplicitly == false)) 
                            && (this.IsLocalFileSystemWebService(value) == false))) {
                    base.UseDefaultCredentials = false;
                }
                base.Url = value;
            }
        }
        
        public new bool UseDefaultCredentials {
            get {
                return base.UseDefaultCredentials;
            }
            set {
                base.UseDefaultCredentials = value;
                this.useDefaultCredentialsSetExplicitly = true;
            }
        }
        
        /// <remarks/>
        public event getProviderAccountsCompletedEventHandler getProviderAccountsCompleted;
        
        /// <remarks/>
        public event getResultsCompletedEventHandler getResultsCompleted;
        
        /// <remarks/>
        public event getMoreResultsCompletedEventHandler getMoreResultsCompleted;
        
        /// <remarks/>
        public event acknowledgeResultsCompletedEventHandler acknowledgeResultsCompleted;
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://medplus.com/resultsHub/observations", ResponseNamespace="http://medplus.com/resultsHub/observations")]
        [return: System.Xml.Serialization.SoapElementAttribute("result")]
        public ProviderAccount[] getProviderAccounts() {
            object[] results = this.Invoke("getProviderAccounts", new object[0]);
            return ((ProviderAccount[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetProviderAccounts(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getProviderAccounts", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public ProviderAccount[] EndgetProviderAccounts(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((ProviderAccount[])(results[0]));
        }
        
        /// <remarks/>
        public void getProviderAccountsAsync() {
            this.getProviderAccountsAsync(null);
        }
        
        /// <remarks/>
        public void getProviderAccountsAsync(object userState) {
            if ((this.getProviderAccountsOperationCompleted == null)) {
                this.getProviderAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetProviderAccountsOperationCompleted);
            }
            this.InvokeAsync("getProviderAccounts", new object[0], this.getProviderAccountsOperationCompleted, userState);
        }
        
        private void OngetProviderAccountsOperationCompleted(object arg) {
            if ((this.getProviderAccountsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.getProviderAccountsCompleted(this, new getProviderAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://medplus.com/resultsHub/observations", ResponseNamespace="http://medplus.com/resultsHub/observations")]
        [return: System.Xml.Serialization.SoapElementAttribute("result")]
        public PrintableResultsResponse getResults(ResultsRequest resultsRequest) {
            object[] results = this.Invoke("getResults", new object[] {
                        resultsRequest});
            return ((PrintableResultsResponse)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetResults(ResultsRequest resultsRequest, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getResults", new object[] {
                        resultsRequest}, callback, asyncState);
        }
        
        /// <remarks/>
        public PrintableResultsResponse EndgetResults(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((PrintableResultsResponse)(results[0]));
        }
        
        /// <remarks/>
        public void getResultsAsync(ResultsRequest resultsRequest) {
            this.getResultsAsync(resultsRequest, null);
        }
        
        /// <remarks/>
        public void getResultsAsync(ResultsRequest resultsRequest, object userState) {
            if ((this.getResultsOperationCompleted == null)) {
                this.getResultsOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetResultsOperationCompleted);
            }
            this.InvokeAsync("getResults", new object[] {
                        resultsRequest}, this.getResultsOperationCompleted, userState);
        }
        
        private void OngetResultsOperationCompleted(object arg) {
            if ((this.getResultsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.getResultsCompleted(this, new getResultsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://medplus.com/resultsHub/observations", ResponseNamespace="http://medplus.com/resultsHub/observations")]
        [return: System.Xml.Serialization.SoapElementAttribute("result")]
        public PrintableResultsResponse getMoreResults(string requestId) {
            object[] results = this.Invoke("getMoreResults", new object[] {
                        requestId});
            return ((PrintableResultsResponse)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetMoreResults(string requestId, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getMoreResults", new object[] {
                        requestId}, callback, asyncState);
        }
        
        /// <remarks/>
        public PrintableResultsResponse EndgetMoreResults(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((PrintableResultsResponse)(results[0]));
        }
        
        /// <remarks/>
        public void getMoreResultsAsync(string requestId) {
            this.getMoreResultsAsync(requestId, null);
        }
        
        /// <remarks/>
        public void getMoreResultsAsync(string requestId, object userState) {
            if ((this.getMoreResultsOperationCompleted == null)) {
                this.getMoreResultsOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetMoreResultsOperationCompleted);
            }
            this.InvokeAsync("getMoreResults", new object[] {
                        requestId}, this.getMoreResultsOperationCompleted, userState);
        }
        
        private void OngetMoreResultsOperationCompleted(object arg) {
            if ((this.getMoreResultsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.getMoreResultsCompleted(this, new getMoreResultsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://medplus.com/resultsHub/observations", ResponseNamespace="http://medplus.com/resultsHub/observations")]
        public void acknowledgeResults(string requestId, ResultInfo result, string rejectionReason) {
            this.Invoke("acknowledgeResults", new object[] {
                        requestId,
                        result,
                        rejectionReason});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginacknowledgeResults(string requestId, ResultInfo result, string rejectionReason, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("acknowledgeResults", new object[] {
                        requestId,
                        result,
                        rejectionReason}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndacknowledgeResults(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        public void acknowledgeResultsAsync(string requestId, ResultInfo result, string rejectionReason) {
            this.acknowledgeResultsAsync(requestId, result, rejectionReason, null);
        }
        
        /// <remarks/>
        public void acknowledgeResultsAsync(string requestId, ResultInfo result, string rejectionReason, object userState) {
            if ((this.acknowledgeResultsOperationCompleted == null)) {
                this.acknowledgeResultsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnacknowledgeResultsOperationCompleted);
            }
            this.InvokeAsync("acknowledgeResults", new object[] {
                        requestId,
                        result,
                        rejectionReason}, this.acknowledgeResultsOperationCompleted, userState);
        }
        
        private void OnacknowledgeResultsOperationCompleted(object arg) {
            if ((this.acknowledgeResultsCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.acknowledgeResultsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
        /// <remarks/>
        public new void CancelAsync(object userState) {
            base.CancelAsync(userState);
        }
        
        private bool IsLocalFileSystemWebService(string url) {
            if (((url == null) 
                        || (url == string.Empty))) {
                return false;
            }
            System.Uri wsUri = new System.Uri(url);
            if (((wsUri.Port >= 1024) 
                        && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
                return true;
            }
            return false;
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.results.webservice")]
    public partial class ProviderAccount {
        
        private string accountIdField;
        
        private string accountNameField;
        
        private string descriptionField;
        
        private string descriptiveNameField;
        
        private string internalIdField;
        
        private Provider providerField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string accountId {
            get {
                return this.accountIdField;
            }
            set {
                this.accountIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string accountName {
            get {
                return this.accountNameField;
            }
            set {
                this.accountNameField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string descriptiveName {
            get {
                return this.descriptiveNameField;
            }
            set {
                this.descriptiveNameField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string internalId {
            get {
                return this.internalIdField;
            }
            set {
                this.internalIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public Provider provider {
            get {
                return this.providerField;
            }
            set {
                this.providerField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.results.webservice")]
    public partial class Provider {
        
        private string descriptionField;
        
        private string nameField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string name {
            get {
                return this.nameField;
            }
            set {
                this.nameField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.results.webservice.printable")]
    public partial class ResultInfo {
        
        private System.Nullable<System.DateTime> arrivalDateField;
        
        private string messageControlIdField;
        
        private string providerAcctIdField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public System.Nullable<System.DateTime> arrivalDate {
            get {
                return this.arrivalDateField;
            }
            set {
                this.arrivalDateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string messageControlId {
            get {
                return this.messageControlIdField;
            }
            set {
                this.messageControlIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string providerAcctId {
            get {
                return this.providerAcctIdField;
            }
            set {
                this.providerAcctIdField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.results.webservice.printable")]
    public partial class PrintableResultsResponse {
        
        private string fileMimeTypeField;
        
        private string fileNameField;
        
        private System.Nullable<bool> isMoreField;
        
        private string requestIdField;
        
        private byte[] resultDataField;
        
        private ResultInfo resultInfoField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string fileMimeType {
            get {
                return this.fileMimeTypeField;
            }
            set {
                this.fileMimeTypeField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string fileName {
            get {
                return this.fileNameField;
            }
            set {
                this.fileNameField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public System.Nullable<bool> isMore {
            get {
                return this.isMoreField;
            }
            set {
                this.isMoreField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string requestId {
            get {
                return this.requestIdField;
            }
            set {
                this.requestIdField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(DataType="base64Binary", IsNullable=true)]
        public byte[] resultData {
            get {
                return this.resultDataField;
            }
            set {
                this.resultDataField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public ResultInfo resultInfo {
            get {
                return this.resultInfoField;
            }
            set {
                this.resultInfoField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.SoapTypeAttribute(Namespace="java:com.medplus.serviceHub.results.webservice")]
    public partial class ResultsRequest {
        
        private string endDateField;
        
        private System.Nullable<int> maxMessagesField;
        
        private string[] providerAccountIdsField;
        
        private bool retrieveFinalsOnlyField;
        
        private bool retrieveObsoleteResultsField;
        
        private string startDateField;
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string endDate {
            get {
                return this.endDateField;
            }
            set {
                this.endDateField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public System.Nullable<int> maxMessages {
            get {
                return this.maxMessagesField;
            }
            set {
                this.maxMessagesField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string[] providerAccountIds {
            get {
                return this.providerAccountIdsField;
            }
            set {
                this.providerAccountIdsField = value;
            }
        }
        
        /// <remarks/>
        public bool retrieveFinalsOnly {
            get {
                return this.retrieveFinalsOnlyField;
            }
            set {
                this.retrieveFinalsOnlyField = value;
            }
        }
        
        /// <remarks/>
        public bool retrieveObsoleteResults {
            get {
                return this.retrieveObsoleteResultsField;
            }
            set {
                this.retrieveObsoleteResultsField = value;
            }
        }
        
        /// <remarks/>
        [System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
        public string startDate {
            get {
                return this.startDateField;
            }
            set {
                this.startDateField = value;
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    public delegate void getProviderAccountsCompletedEventHandler(object sender, getProviderAccountsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class getProviderAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal getProviderAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public ProviderAccount[] Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((ProviderAccount[])(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    public delegate void getResultsCompletedEventHandler(object sender, getResultsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class getResultsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal getResultsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public PrintableResultsResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((PrintableResultsResponse)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    public delegate void getMoreResultsCompletedEventHandler(object sender, getMoreResultsCompletedEventArgs e);
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class getMoreResultsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        
        private object[] results;
        
        internal getMoreResultsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
                base(exception, cancelled, userState) {
            this.results = results;
        }
        
        /// <remarks/>
        public PrintableResultsResponse Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((PrintableResultsResponse)(this.results[0]));
            }
        }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")]
    public delegate void acknowledgeResultsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}

#pragma warning restore 1591