@@ -32,10 +32,10 @@ internal struct OutboundObjectMessage {
3232internal struct ObjectOperation {
3333 internal var action : WireEnum < ObjectOperationAction > // OOP3a
3434 internal var objectId : String // OOP3b
35- internal var mapOp : MapOp ? // OOP3c
36- internal var counterOp : WireCounterOp ? // OOP3d
37- internal var map : Map ? // OOP3e
38- internal var counter : WireCounter ? // OOP3f
35+ internal var mapOp : ObjectsMapOp ? // OOP3c
36+ internal var counterOp : WireObjectsCounterOp ? // OOP3d
37+ internal var map : ObjectsMap ? // OOP3e
38+ internal var counter : WireObjectsCounter ? // OOP3f
3939 internal var nonce : String ? // OOP3g
4040 internal var initialValue : Data ? // OOP3h
4141 internal var initialValueEncoding : String ? // OOP3i
@@ -56,29 +56,29 @@ internal struct ObjectData {
5656 internal var string : StringPropertyContent ? // OD2f
5757}
5858
59- internal struct MapOp {
60- internal var key : String // MOP2a
61- internal var data : ObjectData ? // MOP2b
59+ internal struct ObjectsMapOp {
60+ internal var key : String // OMO2a
61+ internal var data : ObjectData ? // OMO2b
6262}
6363
64- internal struct MapEntry {
65- internal var tombstone : Bool ? // ME2a
66- internal var timeserial : String ? // ME2b
67- internal var data : ObjectData // ME2c
64+ internal struct ObjectsMapEntry {
65+ internal var tombstone : Bool ? // OME2a
66+ internal var timeserial : String ? // OME2b
67+ internal var data : ObjectData // OME2c
6868}
6969
70- internal struct Map {
71- internal var semantics : WireEnum < MapSemantics > // MAP3a
72- internal var entries : [ String : MapEntry ] ? // MAP3b
70+ internal struct ObjectsMap {
71+ internal var semantics : WireEnum < ObjectsMapSemantics > // OMP3a
72+ internal var entries : [ String : ObjectsMapEntry ] ? // OMP3b
7373}
7474
7575internal struct ObjectState {
7676 internal var objectId : String // OST2a
7777 internal var siteTimeserials : [ String : String ] // OST2b
7878 internal var tombstone : Bool // OST2c
7979 internal var createOp : ObjectOperation ? // OST2d
80- internal var map : Map ? // OST2e
81- internal var counter : WireCounter ? // OST2f
80+ internal var map : ObjectsMap ? // OST2e
81+ internal var counter : WireObjectsCounter ? // OST2f
8282}
8383
8484internal extension InboundObjectMessage {
@@ -139,12 +139,12 @@ internal extension ObjectOperation {
139139 ) throws ( InternalError) {
140140 action = wireObjectOperation. action
141141 objectId = wireObjectOperation. objectId
142- mapOp = try wireObjectOperation. mapOp. map { wireMapOp throws ( InternalError) in
143- try . init( wireMapOp : wireMapOp , format: format)
142+ mapOp = try wireObjectOperation. mapOp. map { wireObjectsMapOp throws ( InternalError) in
143+ try . init( wireObjectsMapOp : wireObjectsMapOp , format: format)
144144 }
145145 counterOp = wireObjectOperation. counterOp
146146 map = try wireObjectOperation. map. map { wireMap throws ( InternalError) in
147- try . init( wireMap : wireMap, format: format)
147+ try . init( wireObjectsMap : wireMap, format: format)
148148 }
149149 counter = wireObjectOperation. counter
150150
@@ -319,54 +319,54 @@ internal extension ObjectData {
319319 }
320320}
321321
322- internal extension MapOp {
323- /// Initializes a `MapOp ` from a `WireMapOp `, applying the data decoding rules of OD5.
322+ internal extension ObjectsMapOp {
323+ /// Initializes a `ObjectsMapOp ` from a `WireObjectsMapOp `, applying the data decoding rules of OD5.
324324 ///
325325 /// - Parameters:
326326 /// - format: The format to use when applying the decoding rules of OD5.
327327 /// - Throws: `InternalError` if JSON or Base64 decoding fails.
328328 init (
329- wireMapOp : WireMapOp ,
329+ wireObjectsMapOp : WireObjectsMapOp ,
330330 format: AblyPlugin . EncodingFormat
331331 ) throws ( InternalError) {
332- key = wireMapOp . key
333- data = try wireMapOp . data. map { wireObjectData throws ( InternalError) in
332+ key = wireObjectsMapOp . key
333+ data = try wireObjectsMapOp . data. map { wireObjectData throws ( InternalError) in
334334 try . init( wireObjectData: wireObjectData, format: format)
335335 }
336336 }
337337
338- /// Converts this `MapOp ` to a `WireMapOp `, applying the data encoding rules of OD4.
338+ /// Converts this `ObjectsMapOp ` to a `WireObjectsMapOp `, applying the data encoding rules of OD4.
339339 ///
340340 /// - Parameters:
341341 /// - format: The format to use when applying the encoding rules of OD4.
342- func toWire( format: AblyPlugin . EncodingFormat ) -> WireMapOp {
342+ func toWire( format: AblyPlugin . EncodingFormat ) -> WireObjectsMapOp {
343343 . init(
344344 key: key,
345345 data: data? . toWire ( format: format) ,
346346 )
347347 }
348348}
349349
350- internal extension MapEntry {
351- /// Initializes a `MapEntry ` from a `WireMapEntry `, applying the data decoding rules of OD5.
350+ internal extension ObjectsMapEntry {
351+ /// Initializes an `ObjectsMapEntry ` from a `WireObjectsMapEntry `, applying the data decoding rules of OD5.
352352 ///
353353 /// - Parameters:
354354 /// - format: The format to use when applying the decoding rules of OD5.
355355 /// - Throws: `InternalError` if JSON or Base64 decoding fails.
356356 init (
357- wireMapEntry : WireMapEntry ,
357+ wireObjectsMapEntry : WireObjectsMapEntry ,
358358 format: AblyPlugin . EncodingFormat
359359 ) throws ( InternalError) {
360- tombstone = wireMapEntry . tombstone
361- timeserial = wireMapEntry . timeserial
362- data = try . init( wireObjectData: wireMapEntry . data, format: format)
360+ tombstone = wireObjectsMapEntry . tombstone
361+ timeserial = wireObjectsMapEntry . timeserial
362+ data = try . init( wireObjectData: wireObjectsMapEntry . data, format: format)
363363 }
364364
365- /// Converts this `MapEntry ` to a `WireMapEntry `, applying the data encoding rules of OD4.
365+ /// Converts this `ObjectsMapEntry ` to a `WireObjectsMapEntry `, applying the data encoding rules of OD4.
366366 ///
367367 /// - Parameters:
368368 /// - format: The format to use when applying the encoding rules of OD4.
369- func toWire( format: AblyPlugin . EncodingFormat ) -> WireMapEntry {
369+ func toWire( format: AblyPlugin . EncodingFormat ) -> WireObjectsMapEntry {
370370 . init(
371371 tombstone: tombstone,
372372 timeserial: timeserial,
@@ -375,27 +375,27 @@ internal extension MapEntry {
375375 }
376376}
377377
378- internal extension Map {
379- /// Initializes a `Map ` from a `WireMap `, applying the data decoding rules of OD5.
378+ internal extension ObjectsMap {
379+ /// Initializes an `ObjectsMap ` from a `WireObjectsMap `, applying the data decoding rules of OD5.
380380 ///
381381 /// - Parameters:
382382 /// - format: The format to use when applying the decoding rules of OD5.
383383 /// - Throws: `InternalError` if JSON or Base64 decoding fails.
384384 init (
385- wireMap : WireMap ,
385+ wireObjectsMap : WireObjectsMap ,
386386 format: AblyPlugin . EncodingFormat
387387 ) throws ( InternalError) {
388- semantics = wireMap . semantics
389- entries = try wireMap . entries? . ablyLiveObjects_mapValuesWithTypedThrow { wireMapEntry throws ( InternalError) in
390- try . init( wireMapEntry : wireMapEntry, format: format)
388+ semantics = wireObjectsMap . semantics
389+ entries = try wireObjectsMap . entries? . ablyLiveObjects_mapValuesWithTypedThrow { wireMapEntry throws ( InternalError) in
390+ try . init( wireObjectsMapEntry : wireMapEntry, format: format)
391391 }
392392 }
393393
394- /// Converts this `Map ` to a `WireMap `, applying the data encoding rules of OD4.
394+ /// Converts this `ObjectsMap ` to a `WireObjectsMap `, applying the data encoding rules of OD4.
395395 ///
396396 /// - Parameters:
397397 /// - format: The format to use when applying the encoding rules of OD4.
398- func toWire( format: AblyPlugin . EncodingFormat ) -> WireMap {
398+ func toWire( format: AblyPlugin . EncodingFormat ) -> WireObjectsMap {
399399 . init(
400400 semantics: semantics,
401401 entries: entries? . mapValues { $0. toWire ( format: format) } ,
@@ -419,8 +419,8 @@ internal extension ObjectState {
419419 createOp = try wireObjectState. createOp. map { wireObjectOperation throws ( InternalError) in
420420 try . init( wireObjectOperation: wireObjectOperation, format: format)
421421 }
422- map = try wireObjectState. map. map { wireMap throws ( InternalError) in
423- try . init( wireMap : wireMap , format: format)
422+ map = try wireObjectState. map. map { wireObjectsMap throws ( InternalError) in
423+ try . init( wireObjectsMap : wireObjectsMap , format: format)
424424 }
425425 counter = wireObjectState. counter
426426 }
0 commit comments