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), Integrated 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&=\+$,\?/\-_\.!~\*'()]*
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\*#\.,\-+'~`!@$%^:;=(){}\[\]?"'&></_|\\ ]*
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:
187: /// <summary/>
188: public DateTime Updated { get; set; }
189:
190: /// <summary/>
191: public System.Guid UserId { get; set; }
192:
193: ////////////////////////////////////////////////////////////////////////////
194:
195: /// <summary>
196: ///
197: /// </summary>
198: public static string AgcfEndpointId(string prividUser)
199: {
200: return prividUser;
201: }
202:
203: ////////////////////////////////////////////////////////////////////////////
204:
205: /// <summary>
206: ///
207: /// </summary>
208: public bool Equal(AgcfEndpoint b)
209: {
210: // below: this will not check the Id, Created, Updated fields
211: bool areEqual;
212:
213: //if (this.BatteryBackupAvailable != b.BatteryBackupAvailable) areEqual = false;
214: //else areEqual = true;
215:
216: areEqual = false;
217:
218: return areEqual;
219: }
220:
221: ////////////////////////////////////////////////////////////////////////////
222:
223: /// <summary>
224: ///
225: /// </summary>
226: public bool Update(AgcfEndpoint updatedAgcfEndpoint)
227: {
228: // below: this will not update Id, Created
229: bool updated;
230:
231: updated = false;
232:
233: if (this.PrividUser != updatedAgcfEndpoint.PrividUser) { this.PrividUser = updatedAgcfEndpoint.PrividUser; updated = true; }
234: if (this.Slot != updatedAgcfEndpoint.Slot) { this.Slot = updatedAgcfEndpoint.Slot; updated = true; }
235: if (this.Port != updatedAgcfEndpoint.Port) { this.Port = updatedAgcfEndpoint.Port; updated = true; }
236: if (this.GwId != updatedAgcfEndpoint.GwId) { this.GwId = updatedAgcfEndpoint.GwId; updated = true; }
237: if (this.Dn != updatedAgcfEndpoint.Dn) { this.Dn = updatedAgcfEndpoint.Dn; updated = true; }
238: if (this.AdditionalDNs != updatedAgcfEndpoint.AdditionalDNs) { this.AdditionalDNs = updatedAgcfEndpoint.AdditionalDNs; updated = true; }
239: if (this.DomainIndex != updatedAgcfEndpoint.DomainIndex) { this.DomainIndex = updatedAgcfEndpoint.DomainIndex; updated = true; }
240: if (this.FeatureFlag != updatedAgcfEndpoint.FeatureFlag) { this.FeatureFlag = updatedAgcfEndpoint.FeatureFlag; updated = true; }
241: if (this.DslamId != updatedAgcfEndpoint.DslamId) { this.DslamId = updatedAgcfEndpoint.DslamId; updated = true; }
242: if (this.Rack != updatedAgcfEndpoint.Rack) { this.Rack = updatedAgcfEndpoint.Rack; updated = true; }
243: if (this.Shelf != updatedAgcfEndpoint.Shelf) { this.Shelf = updatedAgcfEndpoint.Shelf; updated = true; }
244: if (this.FlatTermID != updatedAgcfEndpoint.FlatTermID) { this.FlatTermID = updatedAgcfEndpoint.FlatTermID; updated = true; }
245: if (this.SubscriberType != updatedAgcfEndpoint.SubscriberType) { this.SubscriberType = updatedAgcfEndpoint.SubscriberType; updated = true; }
246: if (this.ReversePolarity != updatedAgcfEndpoint.ReversePolarity) { this.ReversePolarity = updatedAgcfEndpoint.ReversePolarity; updated = true; }
247: if (this.PayphoneMetering != updatedAgcfEndpoint.PayphoneMetering) { this.PayphoneMetering = updatedAgcfEndpoint.PayphoneMetering; updated = true; }
248: if (this.DigitMap1st != updatedAgcfEndpoint.DigitMap1st) { this.DigitMap1st = updatedAgcfEndpoint.DigitMap1st; updated = true; }
249: if (this.DigitMap2nd != updatedAgcfEndpoint.DigitMap2nd) { this.DigitMap2nd = updatedAgcfEndpoint.DigitMap2nd; updated = true; }
250: if (this.DialTone2nd != updatedAgcfEndpoint.DialTone2nd) { this.DialTone2nd = updatedAgcfEndpoint.DialTone2nd; updated = true; }
251: if (this.CallHoldLc != updatedAgcfEndpoint.CallHoldLc) { this.CallHoldLc = updatedAgcfEndpoint.CallHoldLc; updated = true; }
252: if (this.CallWaitingLc != updatedAgcfEndpoint.CallWaitingLc) { this.CallWaitingLc = updatedAgcfEndpoint.CallWaitingLc; updated = true; }
253: if (this.CallToggleLc != updatedAgcfEndpoint.CallToggleLc) { this.CallToggleLc = updatedAgcfEndpoint.CallToggleLc; updated = true; }
254: if (this.ThreeWayCallLc != updatedAgcfEndpoint.ThreeWayCallLc) { this.ThreeWayCallLc = updatedAgcfEndpoint.ThreeWayCallLc; updated = true; }
255: if (this.McidLc != updatedAgcfEndpoint.McidLc) { this.McidLc = updatedAgcfEndpoint.McidLc; updated = true; }
256: if (this.Password != updatedAgcfEndpoint.Password) { this.Password = updatedAgcfEndpoint.Password; updated = true; }
257: if (this.CallTransferLc != updatedAgcfEndpoint.CallTransferLc) { this.CallTransferLc = updatedAgcfEndpoint.CallTransferLc; updated = true; }
258:
259: if (this.AgcfGatewayRecord != updatedAgcfEndpoint.AgcfGatewayRecord) { this.AgcfGatewayRecord = updatedAgcfEndpoint.AgcfGatewayRecord; updated = true; }
260:
261: if (this.UserId != updatedAgcfEndpoint.UserId) { this.UserId = updatedAgcfEndpoint.UserId; updated = true; }
262:
263: if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
264:
265: return updated;
266: }
267:
268: ////////////////////////////////////////////////////////////////////////////
269: ////////////////////////////////////////////////////////////////////////////
270: }
271:
272: ////////////////////////////////////////////////////////////////////////////
273: ////////////////////////////////////////////////////////////////////////////
274: }