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

// 
// This code was auto-generated by Microsoft.VisualStudio.ServiceReference.Platforms, version 14.0.23107.0
// 
namespace RawNotification.DotNetCoreLibs.ServiceReference1 {
    using System.Runtime.Serialization;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="BaseModel", Namespace="http://schemas.datacontract.org/2004/07/RawNotification.SharedModels.DBModels")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(RawNotification.DotNetCoreLibs.ServiceReference1.Device))]
    public partial class BaseModel : object, System.ComponentModel.INotifyPropertyChanged {
        
        private long IdField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public long Id {
            get {
                return this.IdField;
            }
            set {
                if ((this.IdField.Equals(value) != true)) {
                    this.IdField = value;
                    this.RaisePropertyChanged("Id");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Device", Namespace="http://schemas.datacontract.org/2004/07/RawNotification.SharedModels.DBModels")]
    public partial class Device : RawNotification.DotNetCoreLibs.ServiceReference1.BaseModel {
        
        private string IMEIField;
        
        private int OSIdField;
        
        private long ReceiverNewIDField;
        
        private string URIField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string IMEI {
            get {
                return this.IMEIField;
            }
            set {
                if ((object.ReferenceEquals(this.IMEIField, value) != true)) {
                    this.IMEIField = value;
                    this.RaisePropertyChanged("IMEI");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int OSId {
            get {
                return this.OSIdField;
            }
            set {
                if ((this.OSIdField.Equals(value) != true)) {
                    this.OSIdField = value;
                    this.RaisePropertyChanged("OSId");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public long ReceiverNewID {
            get {
                return this.ReceiverNewIDField;
            }
            set {
                if ((this.ReceiverNewIDField.Equals(value) != true)) {
                    this.ReceiverNewIDField = value;
                    this.RaisePropertyChanged("ReceiverNewID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string URI {
            get {
                return this.URIField;
            }
            set {
                if ((object.ReferenceEquals(this.URIField, value) != true)) {
                    this.URIField = value;
                    this.RaisePropertyChanged("URI");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="BaseServiceResult", Namespace="http://schemas.datacontract.org/2004/07/RawNotification.SharedModels")]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfbase64Binary))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfboolean))]
    public partial class BaseServiceResult : object, System.ComponentModel.INotifyPropertyChanged {
        
        private string MessageField;
        
        private RawNotification.SharedModels.ResultStatusCodes StatusCodeField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Message {
            get {
                return this.MessageField;
            }
            set {
                if ((object.ReferenceEquals(this.MessageField, value) != true)) {
                    this.MessageField = value;
                    this.RaisePropertyChanged("Message");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public RawNotification.SharedModels.ResultStatusCodes StatusCode {
            get {
                return this.StatusCodeField;
            }
            set {
                if ((this.StatusCodeField.Equals(value) != true)) {
                    this.StatusCodeField = value;
                    this.RaisePropertyChanged("StatusCode");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="BaseServiceResultOfbase64Binary", Namespace="http://schemas.datacontract.org/2004/07/RawNotification.SharedModels")]
    public partial class BaseServiceResultOfbase64Binary : RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResult {
        
        private byte[] DataField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public byte[] Data {
            get {
                return this.DataField;
            }
            set {
                if ((object.ReferenceEquals(this.DataField, value) != true)) {
                    this.DataField = value;
                    this.RaisePropertyChanged("Data");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="BaseServiceResultOfboolean", Namespace="http://schemas.datacontract.org/2004/07/RawNotification.SharedModels")]
    public partial class BaseServiceResultOfboolean : RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResult {
        
        private bool DataField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public bool Data {
            get {
                return this.DataField;
            }
            set {
                if ((this.DataField.Equals(value) != true)) {
                    this.DataField = value;
                    this.RaisePropertyChanged("Data");
                }
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference1.IRNClientCommunicator")]
    public interface IRNClientCommunicator {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IRNClientCommunicator/AddDevice", ReplyAction="http://tempuri.org/IRNClientCommunicator/AddDeviceResponse")]
        System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResult> AddDeviceAsync(long ReceiverId, RawNotification.DotNetCoreLibs.ServiceReference1.Device deviceInfo, string ReceiverToken);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IRNClientCommunicator/GetNotificationContent", ReplyAction="http://tempuri.org/IRNClientCommunicator/GetNotificationContentResponse")]
        System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfbase64Binary> GetNotificationContentAsync(long NotificationId, string NotificationAccessKey, string ReceiverToken, long ReceiverId);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IRNClientCommunicator/CheckIfNotificationRead", ReplyAction="http://tempuri.org/IRNClientCommunicator/CheckIfNotificationReadResponse")]
        System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfboolean> CheckIfNotificationReadAsync(long ReceiverNotificationID);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IRNClientCommunicatorChannel : RawNotification.DotNetCoreLibs.ServiceReference1.IRNClientCommunicator, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class RNClientCommunicatorClient : System.ServiceModel.ClientBase<RawNotification.DotNetCoreLibs.ServiceReference1.IRNClientCommunicator>, RawNotification.DotNetCoreLibs.ServiceReference1.IRNClientCommunicator {
        
        /// <summary>
        /// Implement this partial method to configure the service endpoint.
        /// </summary>
        /// <param name="serviceEndpoint">The endpoint to configure</param>
        /// <param name="clientCredentials">The client credentials</param>
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
        
        public RNClientCommunicatorClient() : 
                base(RNClientCommunicatorClient.GetDefaultBinding(), RNClientCommunicatorClient.GetDefaultEndpointAddress()) {
            this.Endpoint.Name = EndpointConfiguration.NetTcpBinding_IRNClientCommunicator.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RNClientCommunicatorClient(EndpointConfiguration endpointConfiguration) : 
                base(RNClientCommunicatorClient.GetBindingForEndpoint(endpointConfiguration), RNClientCommunicatorClient.GetEndpointAddress(endpointConfiguration)) {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RNClientCommunicatorClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
                base(RNClientCommunicatorClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RNClientCommunicatorClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(RNClientCommunicatorClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public RNClientCommunicatorClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResult> AddDeviceAsync(long ReceiverId, RawNotification.DotNetCoreLibs.ServiceReference1.Device deviceInfo, string ReceiverToken) {
            return base.Channel.AddDeviceAsync(ReceiverId, deviceInfo, ReceiverToken);
        }
        
        public System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfbase64Binary> GetNotificationContentAsync(long NotificationId, string NotificationAccessKey, string ReceiverToken, long ReceiverId) {
            return base.Channel.GetNotificationContentAsync(NotificationId, NotificationAccessKey, ReceiverToken, ReceiverId);
        }
        
        public System.Threading.Tasks.Task<RawNotification.DotNetCoreLibs.ServiceReference1.BaseServiceResultOfboolean> CheckIfNotificationReadAsync(long ReceiverNotificationID) {
            return base.Channel.CheckIfNotificationReadAsync(ReceiverNotificationID);
        }
        
        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.NetTcpBinding_IRNClientCommunicator)) {
                System.ServiceModel.NetTcpBinding result = new System.ServiceModel.NetTcpBinding();
                result.MaxBufferSize = int.MaxValue;
                result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
                result.MaxReceivedMessageSize = int.MaxValue;
                result.Security.Mode = System.ServiceModel.SecurityMode.None;
                return result;
            }
            throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
        }
        
        private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) {
            if ((endpointConfiguration == EndpointConfiguration.NetTcpBinding_IRNClientCommunicator)) {
                return new System.ServiceModel.EndpointAddress("net.tcp://localhost:2695/RNClientService");
            }
            throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
        }
        
        private static System.ServiceModel.Channels.Binding GetDefaultBinding() {
            return RNClientCommunicatorClient.GetBindingForEndpoint(EndpointConfiguration.NetTcpBinding_IRNClientCommunicator);
        }
        
        private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() {
            return RNClientCommunicatorClient.GetEndpointAddress(EndpointConfiguration.NetTcpBinding_IRNClientCommunicator);
        }
        
        public enum EndpointConfiguration {
            
            NetTcpBinding_IRNClientCommunicator,
        }
    }
}
