شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » AgcfEndpoint

Public general use code classes and xml files that we've compiled and used over the years:

AGCF Endpoint Entity Framework class for Next Generation Network (NGN) entity model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.ComponentModel.DataAnnotations;
   4:  using System.ComponentModel.DataAnnotations.Schema;
   5:   
   6:  namespace Ia.Ngn.Cl.Model.Nokia
   7:  {
   8:      ////////////////////////////////////////////////////////////////////////////
   9:   
  10:      /// <summary publish="true">
  11:      /// AGCF Endpoint Entity Framework class for Next Generation Network (NGN) entity model.
  12:      /// </summary>
  13:      /// 
  14:      /// <remarks> 
  15:      /// Copyright � 2014-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  16:      ///
  17:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  18:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  19:      ///
  20:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  21:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  22:      /// 
  23:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  24:      /// 
  25:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  26:      /// </remarks> 
  27:      public partial class AgcfEndpoint
  28:      {
  29:          /// <summary>
  30:          /// 1360 COM WebAPI User Guide 255-400-419R3.X
  31:          /// ngfs-agcfendpoint-v2(rtrv,ent,ed,dlt)
  32:          /// </summary>
  33:          public AgcfEndpoint() { }
  34:   
  35:          /// <summary/>
  36:          [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
  37:          public string Id { get; set; }
  38:   
  39:          /// <summary>
  40:          /// PrividUser (req for ent,req for ed). LCP Aid of AGCF Endpoint, same value of PrimaryPUID. String (0-32) [+0-9a-zA-Z:,\-_\.'()]*
  41:          /// </summary>
  42:          public string PrividUser { get; set; }
  43:   
  44:          /// <summary>
  45:          /// Slot (opt for ent,na for ed). LCP Integer (1-99)
  46:          /// </summary>
  47:          public int Slot { get; set; }
  48:   
  49:          /// <summary>
  50:          /// Port (opt for ent,na for ed). LCP Integer (1-99), LCP Integer (2048-4047), LCP-CTS R8.0 Integer (2048-18047), LCP-CTS R8.1.1 Integer (2048-502047)
  51:          /// </summary>
  52:          public int Port { get; set; }
  53:   
  54:          /// <summary>
  55:          /// GwId (req for ent,na for ed). LCP-CTS R9.1 Integer (2048-5002047)
  56:          /// </summary>
  57:          public int GwId { get; set; }
  58:   
  59:          /// <summary>
  60:          /// Dn (req for ent,na for ed). LCP String (0-32) [+0-9a-zA-Z:,\-_\.'()]*
  61:          /// </summary>
  62:          public string Dn { get; set; }
  63:   
  64:          /// <summary>
  65:          /// AdditionalDNs (opt for ent,opt for ed). LCP-CTS R8.1 String, up 9 space separated additional DNs. Each can be up to 32 characters long [0-9a-zA-Z&amp;=\+$,\?/\-_\.!~\*'()]*
  66:          /// </summary>
  67:          public string AdditionalDNs { get; set; }
  68:   
  69:          /// <summary>
  70:          /// DomainIndex (opt for ent,na for ed). LCP Integer (0-150)
  71:          /// </summary>
  72:          public int DomainIndex { get; set; }
  73:   
  74:          /// <summary>
  75:          /// FeatureFlag (opt for ent,opt for ed). LCP Valid value: 0, 1, 2, 0 means None, 1 means WarmLine, 2 means HotLine
  76:          /// </summary>
  77:          public int FeatureFlag { get; set; }
  78:   
  79:          /// <summary>
  80:          /// DslamId (opt for ent,na for ed). LCP String (0-32) [a-zA-Z0-9\*#\.,\-+'~`!@$%^:;=(){}\[\]?&quot;&apos;&amp;&gt;&lt;/_|\\ ]*
  81:          /// </summary>
  82:          public string DslamId { get; set; }
  83:   
  84:          /// <summary>
  85:          /// Rack (opt for ent,na for ed). LCP Integer (1-9)
  86:          /// </summary>
  87:          public int Rack { get; set; }
  88:   
  89:          /// <summary>
  90:          /// Shelf (opt for ent,na for ed). LCP Integer (1-99)
  91:          /// </summary>
  92:          public int Shelf { get; set; }
  93:   
  94:          /// <summary>
  95:          /// FlatTermID (opt for ent,na for ed). LCP-CTS R6.1 Integer (1-32767)
  96:          /// If the GwId corresponding PhysicalTermIDScheme is set to FlatTermID, this FlatTermID field can have D. LCP Command. 317
  97:          /// the value between 1-32767 and the other field shall be set as the following default value:
  98:          /// Slot: 0
  99:          /// Port: 0
 100:          /// DslamId : null
 101:          /// Rack: -1
 102:          /// Shelf: 0
 103:          /// LCP-ISC R21.1.1 Integer (0-32767)
 104:          /// When Shelf/Slot/Port is provisioned, this field will be
 105:          /// set to -1 and value will not be send to NE
 106:          /// </summary>
 107:          public int FlatTermID { get; set; }
 108:   
 109:          /// <summary>
 110:          /// SubscriberType (opt for ent,na for ed). LCP-CTS R6.2 Range: Analog or ISDNBRA. Default: Analog
 111:          /// </summary>
 112:          public bool SubscriberType { get; set; }
 113:   
 114:          /// <summary>
 115:          /// ReversePolarity (opt for ent,opt for ed). LCP-CTS R7.1
 116:          /// Enum: NO_POLARITY_REVERSAL, UPON_DIGIT_COLLECTION_ALWAYS, UPON_REMOTE_ANSWER_ALWAYS, UPON_REMOTE_ANSWER_EXCEPT_FREE_CALLS
 117:          /// Default: NO_POLARITY_REVERSAL
 118:          /// </summary>
 119:          public int ReversePolarity { get; set; }
 120:   
 121:          /// <summary>
 122:          /// PayphoneMetering (opt for ent,opt for ed). LCP-CTS R7.1 
 123:          /// enum: PAYPHONE_REVERSE_POLARITY, PAYPHONE_PULSE_METERING_16_KHZ
 124:          /// default: PAYPHONE_PULSE_METERING_16_KHZ
 125:          /// </summary>
 126:          public int PayphoneMetering { get; set; }
 127:   
 128:          /// <summary>
 129:          /// DigitMap1st (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-64
 130:          /// </summary>
 131:          public int DigitMap1st { get; set; }
 132:   
 133:          /// <summary>
 134:          /// DigitMap2nd (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-64
 135:          /// </summary>
 136:          public int DigitMap2nd { get; set; }
 137:   
 138:          /// <summary>
 139:          /// DialTone2nd (opt for ent,opt for ed). LCP-CTS R7.1 Integer: 0-128
 140:          /// </summary>
 141:          public int DialTone2nd { get; set; }
 142:   
 143:          /// <summary>
 144:          /// CallHoldLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
 145:          /// </summary>
 146:          public bool CallHoldLc { get; set; }
 147:   
 148:          /// <summary>
 149:          /// CallWaitingLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
 150:          /// </summary>
 151:          public bool CallWaitingLc { get; set; }
 152:   
 153:          /// <summary>
 154:          /// CallToggleLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
 155:          /// </summary>
 156:          public bool CallToggleLc { get; set; }
 157:   
 158:          /// <summary>
 159:          /// ThreeWayCallLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default true
 160:          /// </summary>
 161:          public bool ThreeWayCallLc { get; set; }
 162:   
 163:          /// <summary>
 164:          /// McidLc (opt for ent,opt for ed). LCP-CTS R8.0 boolean, default false
 165:          /// </summary>
 166:          public bool McidLc { get; set; }
 167:   
 168:          /// <summary>
 169:          /// Password (opt for ent,opt for ed,na for rtrv). LCP-CTS R8.1 String, max length 32. [+0-9a-zA-Z(),':@&=|-_\.!~*%]*
 170:          /// </summary>
 171:          public string Password { get; set; }
 172:   
 173:          /// <summary>
 174:          /// CallTransferLc (opt for ent,opt for ed). LCP-ISC R22.1 boolean, default false
 175:          /// </summary>
 176:          public bool CallTransferLc { get; set; }
 177:   
 178:          /// <summary/>
 179:          public virtual AgcfGatewayRecord AgcfGatewayRecord { get; set; }
 180:   
 181:          /// <summary/>
 182:          public virtual ICollection<SubParty> SubParties { get; set; }
 183:   
 184:          /// <summary/>
 185:          public DateTime Created { get; set; }
 186:          /// <summary/>
 187:          public DateTime Updated { get; set; }
 188:          /// <summary/>
 189:          public System.Guid UserId { get; set; }
 190:   
 191:          ////////////////////////////////////////////////////////////////////////////
 192:   
 193:          /// <summary>
 194:          ///
 195:          /// </summary>
 196:          public static string AgcfEndpointId(string prividUser)
 197:          {
 198:              return prividUser;
 199:          }
 200:   
 201:          ////////////////////////////////////////////////////////////////////////////
 202:   
 203:          /// <summary>
 204:          ///
 205:          /// </summary>
 206:          public bool Equal(AgcfEndpoint b)
 207:          {
 208:              // below: this will not check the Id, Created, Updated fields
 209:              bool areEqual;
 210:   
 211:              //if (this.BatteryBackupAvailable != b.BatteryBackupAvailable) areEqual = false;
 212:              //else areEqual = true;
 213:   
 214:              areEqual = false;
 215:   
 216:              return areEqual;
 217:          }
 218:   
 219:          ////////////////////////////////////////////////////////////////////////////
 220:   
 221:          /// <summary>
 222:          ///
 223:          /// </summary>
 224:          public bool Update(AgcfEndpoint updatedAgcfEndpoint)
 225:          {
 226:              // below: this will not update Id, Created
 227:              bool updated;
 228:   
 229:              updated = false;
 230:   
 231:              if (this.PrividUser != updatedAgcfEndpoint.PrividUser) { this.PrividUser = updatedAgcfEndpoint.PrividUser; updated = true; }
 232:              if (this.Slot != updatedAgcfEndpoint.Slot) { this.Slot = updatedAgcfEndpoint.Slot; updated = true; }
 233:              if (this.Port != updatedAgcfEndpoint.Port) { this.Port = updatedAgcfEndpoint.Port; updated = true; }
 234:              if (this.GwId != updatedAgcfEndpoint.GwId) { this.GwId = updatedAgcfEndpoint.GwId; updated = true; }
 235:              if (this.Dn != updatedAgcfEndpoint.Dn) { this.Dn = updatedAgcfEndpoint.Dn; updated = true; }
 236:              if (this.AdditionalDNs != updatedAgcfEndpoint.AdditionalDNs) { this.AdditionalDNs = updatedAgcfEndpoint.AdditionalDNs; updated = true; }
 237:              if (this.DomainIndex != updatedAgcfEndpoint.DomainIndex) { this.DomainIndex = updatedAgcfEndpoint.DomainIndex; updated = true; }
 238:              if (this.FeatureFlag != updatedAgcfEndpoint.FeatureFlag) { this.FeatureFlag = updatedAgcfEndpoint.FeatureFlag; updated = true; }
 239:              if (this.DslamId != updatedAgcfEndpoint.DslamId) { this.DslamId = updatedAgcfEndpoint.DslamId; updated = true; }
 240:              if (this.Rack != updatedAgcfEndpoint.Rack) { this.Rack = updatedAgcfEndpoint.Rack; updated = true; }
 241:              if (this.Shelf != updatedAgcfEndpoint.Shelf) { this.Shelf = updatedAgcfEndpoint.Shelf; updated = true; }
 242:              if (this.FlatTermID != updatedAgcfEndpoint.FlatTermID) { this.FlatTermID = updatedAgcfEndpoint.FlatTermID; updated = true; }
 243:              if (this.SubscriberType != updatedAgcfEndpoint.SubscriberType) { this.SubscriberType = updatedAgcfEndpoint.SubscriberType; updated = true; }
 244:              if (this.ReversePolarity != updatedAgcfEndpoint.ReversePolarity) { this.ReversePolarity = updatedAgcfEndpoint.ReversePolarity; updated = true; }
 245:              if (this.PayphoneMetering != updatedAgcfEndpoint.PayphoneMetering) { this.PayphoneMetering = updatedAgcfEndpoint.PayphoneMetering; updated = true; }
 246:              if (this.DigitMap1st != updatedAgcfEndpoint.DigitMap1st) { this.DigitMap1st = updatedAgcfEndpoint.DigitMap1st; updated = true; }
 247:              if (this.DigitMap2nd != updatedAgcfEndpoint.DigitMap2nd) { this.DigitMap2nd = updatedAgcfEndpoint.DigitMap2nd; updated = true; }
 248:              if (this.DialTone2nd != updatedAgcfEndpoint.DialTone2nd) { this.DialTone2nd = updatedAgcfEndpoint.DialTone2nd; updated = true; }
 249:              if (this.CallHoldLc != updatedAgcfEndpoint.CallHoldLc) { this.CallHoldLc = updatedAgcfEndpoint.CallHoldLc; updated = true; }
 250:              if (this.CallWaitingLc != updatedAgcfEndpoint.CallWaitingLc) { this.CallWaitingLc = updatedAgcfEndpoint.CallWaitingLc; updated = true; }
 251:              if (this.CallToggleLc != updatedAgcfEndpoint.CallToggleLc) { this.CallToggleLc = updatedAgcfEndpoint.CallToggleLc; updated = true; }
 252:              if (this.ThreeWayCallLc != updatedAgcfEndpoint.ThreeWayCallLc) { this.ThreeWayCallLc = updatedAgcfEndpoint.ThreeWayCallLc; updated = true; }
 253:              if (this.McidLc != updatedAgcfEndpoint.McidLc) { this.McidLc = updatedAgcfEndpoint.McidLc; updated = true; }
 254:              if (this.Password != updatedAgcfEndpoint.Password) { this.Password = updatedAgcfEndpoint.Password; updated = true; }
 255:              if (this.CallTransferLc != updatedAgcfEndpoint.CallTransferLc) { this.CallTransferLc = updatedAgcfEndpoint.CallTransferLc; updated = true; }
 256:   
 257:              if (this.AgcfGatewayRecord != updatedAgcfEndpoint.AgcfGatewayRecord) { this.AgcfGatewayRecord = updatedAgcfEndpoint.AgcfGatewayRecord; updated = true; }
 258:   
 259:              if (this.UserId != updatedAgcfEndpoint.UserId) { this.UserId = updatedAgcfEndpoint.UserId; updated = true; }
 260:   
 261:              if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
 262:   
 263:              return updated;
 264:          }
 265:   
 266:          ////////////////////////////////////////////////////////////////////////////
 267:          ////////////////////////////////////////////////////////////////////////////
 268:      }
 269:   
 270:      ////////////////////////////////////////////////////////////////////////////
 271:      ////////////////////////////////////////////////////////////////////////////
 272:  }