/Pods/AWSCognito/AWSCognito/CognitoSync/AWSCognitoSyncModel.m

https://gitlab.com/lorostudios/bazl-ios · Objective C · 722 lines · 560 code · 148 blank · 14 comment · 16 complexity · 70875d2d87192a732efdfcb514fd26b2 MD5 · raw file

  1. //
  2. // Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License").
  5. // You may not use this file except in compliance with the License.
  6. // A copy of the License is located at
  7. //
  8. // http://aws.amazon.com/apache2.0
  9. //
  10. // or in the "license" file accompanying this file. This file is distributed
  11. // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. // express or implied. See the License for the specific language governing
  13. // permissions and limitations under the License.
  14. //
  15. #import "AWSCognitoSyncModel.h"
  16. #import <AWSCore/AWSCategory.h>
  17. NSString *const AWSCognitoSyncErrorDomain = @"com.amazonaws.AWSCognitoSyncErrorDomain";
  18. @implementation AWSCognitoSyncBulkPublishRequest
  19. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  20. return @{
  21. @"identityPoolId" : @"IdentityPoolId",
  22. };
  23. }
  24. @end
  25. @implementation AWSCognitoSyncBulkPublishResponse
  26. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  27. return @{
  28. @"identityPoolId" : @"IdentityPoolId",
  29. };
  30. }
  31. @end
  32. @implementation AWSCognitoSyncCognitoStreams
  33. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  34. return @{
  35. @"roleArn" : @"RoleArn",
  36. @"streamName" : @"StreamName",
  37. @"streamingStatus" : @"StreamingStatus",
  38. };
  39. }
  40. + (NSValueTransformer *)streamingStatusJSONTransformer {
  41. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
  42. if ([value isEqualToString:@"ENABLED"]) {
  43. return @(AWSCognitoSyncStreamingStatusEnabled);
  44. }
  45. if ([value isEqualToString:@"DISABLED"]) {
  46. return @(AWSCognitoSyncStreamingStatusDisabled);
  47. }
  48. return @(AWSCognitoSyncStreamingStatusUnknown);
  49. } reverseBlock:^NSString *(NSNumber *value) {
  50. switch ([value integerValue]) {
  51. case AWSCognitoSyncStreamingStatusEnabled:
  52. return @"ENABLED";
  53. case AWSCognitoSyncStreamingStatusDisabled:
  54. return @"DISABLED";
  55. default:
  56. return nil;
  57. }
  58. }];
  59. }
  60. @end
  61. @implementation AWSCognitoSyncDataset
  62. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  63. return @{
  64. @"creationDate" : @"CreationDate",
  65. @"dataStorage" : @"DataStorage",
  66. @"datasetName" : @"DatasetName",
  67. @"identityId" : @"IdentityId",
  68. @"lastModifiedBy" : @"LastModifiedBy",
  69. @"lastModifiedDate" : @"LastModifiedDate",
  70. @"numRecords" : @"NumRecords",
  71. };
  72. }
  73. + (NSValueTransformer *)creationDateJSONTransformer {
  74. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  75. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  76. } reverseBlock:^id(NSDate *date) {
  77. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  78. }];
  79. }
  80. + (NSValueTransformer *)lastModifiedDateJSONTransformer {
  81. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  82. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  83. } reverseBlock:^id(NSDate *date) {
  84. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  85. }];
  86. }
  87. @end
  88. @implementation AWSCognitoSyncDeleteDatasetRequest
  89. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  90. return @{
  91. @"datasetName" : @"DatasetName",
  92. @"identityId" : @"IdentityId",
  93. @"identityPoolId" : @"IdentityPoolId",
  94. };
  95. }
  96. @end
  97. @implementation AWSCognitoSyncDeleteDatasetResponse
  98. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  99. return @{
  100. @"dataset" : @"Dataset",
  101. };
  102. }
  103. + (NSValueTransformer *)datasetJSONTransformer {
  104. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncDataset class]];
  105. }
  106. @end
  107. @implementation AWSCognitoSyncDescribeDatasetRequest
  108. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  109. return @{
  110. @"datasetName" : @"DatasetName",
  111. @"identityId" : @"IdentityId",
  112. @"identityPoolId" : @"IdentityPoolId",
  113. };
  114. }
  115. @end
  116. @implementation AWSCognitoSyncDescribeDatasetResponse
  117. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  118. return @{
  119. @"dataset" : @"Dataset",
  120. };
  121. }
  122. + (NSValueTransformer *)datasetJSONTransformer {
  123. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncDataset class]];
  124. }
  125. @end
  126. @implementation AWSCognitoSyncDescribeIdentityPoolUsageRequest
  127. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  128. return @{
  129. @"identityPoolId" : @"IdentityPoolId",
  130. };
  131. }
  132. @end
  133. @implementation AWSCognitoSyncDescribeIdentityPoolUsageResponse
  134. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  135. return @{
  136. @"identityPoolUsage" : @"IdentityPoolUsage",
  137. };
  138. }
  139. + (NSValueTransformer *)identityPoolUsageJSONTransformer {
  140. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncIdentityPoolUsage class]];
  141. }
  142. @end
  143. @implementation AWSCognitoSyncDescribeIdentityUsageRequest
  144. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  145. return @{
  146. @"identityId" : @"IdentityId",
  147. @"identityPoolId" : @"IdentityPoolId",
  148. };
  149. }
  150. @end
  151. @implementation AWSCognitoSyncDescribeIdentityUsageResponse
  152. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  153. return @{
  154. @"identityUsage" : @"IdentityUsage",
  155. };
  156. }
  157. + (NSValueTransformer *)identityUsageJSONTransformer {
  158. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncIdentityUsage class]];
  159. }
  160. @end
  161. @implementation AWSCognitoSyncGetBulkPublishDetailsRequest
  162. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  163. return @{
  164. @"identityPoolId" : @"IdentityPoolId",
  165. };
  166. }
  167. @end
  168. @implementation AWSCognitoSyncGetBulkPublishDetailsResponse
  169. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  170. return @{
  171. @"bulkPublishCompleteTime" : @"BulkPublishCompleteTime",
  172. @"bulkPublishStartTime" : @"BulkPublishStartTime",
  173. @"bulkPublishStatus" : @"BulkPublishStatus",
  174. @"failureMessage" : @"FailureMessage",
  175. @"identityPoolId" : @"IdentityPoolId",
  176. };
  177. }
  178. + (NSValueTransformer *)bulkPublishCompleteTimeJSONTransformer {
  179. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  180. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  181. } reverseBlock:^id(NSDate *date) {
  182. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  183. }];
  184. }
  185. + (NSValueTransformer *)bulkPublishStartTimeJSONTransformer {
  186. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  187. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  188. } reverseBlock:^id(NSDate *date) {
  189. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  190. }];
  191. }
  192. + (NSValueTransformer *)bulkPublishStatusJSONTransformer {
  193. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
  194. if ([value isEqualToString:@"NOT_STARTED"]) {
  195. return @(AWSCognitoSyncBulkPublishStatusNotStarted);
  196. }
  197. if ([value isEqualToString:@"IN_PROGRESS"]) {
  198. return @(AWSCognitoSyncBulkPublishStatusInProgress);
  199. }
  200. if ([value isEqualToString:@"FAILED"]) {
  201. return @(AWSCognitoSyncBulkPublishStatusFailed);
  202. }
  203. if ([value isEqualToString:@"SUCCEEDED"]) {
  204. return @(AWSCognitoSyncBulkPublishStatusSucceeded);
  205. }
  206. return @(AWSCognitoSyncBulkPublishStatusUnknown);
  207. } reverseBlock:^NSString *(NSNumber *value) {
  208. switch ([value integerValue]) {
  209. case AWSCognitoSyncBulkPublishStatusNotStarted:
  210. return @"NOT_STARTED";
  211. case AWSCognitoSyncBulkPublishStatusInProgress:
  212. return @"IN_PROGRESS";
  213. case AWSCognitoSyncBulkPublishStatusFailed:
  214. return @"FAILED";
  215. case AWSCognitoSyncBulkPublishStatusSucceeded:
  216. return @"SUCCEEDED";
  217. default:
  218. return nil;
  219. }
  220. }];
  221. }
  222. @end
  223. @implementation AWSCognitoSyncGetCognitoEventsRequest
  224. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  225. return @{
  226. @"identityPoolId" : @"IdentityPoolId",
  227. };
  228. }
  229. @end
  230. @implementation AWSCognitoSyncGetCognitoEventsResponse
  231. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  232. return @{
  233. @"events" : @"Events",
  234. };
  235. }
  236. @end
  237. @implementation AWSCognitoSyncGetIdentityPoolConfigurationRequest
  238. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  239. return @{
  240. @"identityPoolId" : @"IdentityPoolId",
  241. };
  242. }
  243. @end
  244. @implementation AWSCognitoSyncGetIdentityPoolConfigurationResponse
  245. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  246. return @{
  247. @"cognitoStreams" : @"CognitoStreams",
  248. @"identityPoolId" : @"IdentityPoolId",
  249. @"pushSync" : @"PushSync",
  250. };
  251. }
  252. + (NSValueTransformer *)cognitoStreamsJSONTransformer {
  253. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncCognitoStreams class]];
  254. }
  255. + (NSValueTransformer *)pushSyncJSONTransformer {
  256. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncPushSync class]];
  257. }
  258. @end
  259. @implementation AWSCognitoSyncIdentityPoolUsage
  260. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  261. return @{
  262. @"dataStorage" : @"DataStorage",
  263. @"identityPoolId" : @"IdentityPoolId",
  264. @"lastModifiedDate" : @"LastModifiedDate",
  265. @"syncSessionsCount" : @"SyncSessionsCount",
  266. };
  267. }
  268. + (NSValueTransformer *)lastModifiedDateJSONTransformer {
  269. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  270. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  271. } reverseBlock:^id(NSDate *date) {
  272. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  273. }];
  274. }
  275. @end
  276. @implementation AWSCognitoSyncIdentityUsage
  277. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  278. return @{
  279. @"dataStorage" : @"DataStorage",
  280. @"datasetCount" : @"DatasetCount",
  281. @"identityId" : @"IdentityId",
  282. @"identityPoolId" : @"IdentityPoolId",
  283. @"lastModifiedDate" : @"LastModifiedDate",
  284. };
  285. }
  286. + (NSValueTransformer *)lastModifiedDateJSONTransformer {
  287. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  288. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  289. } reverseBlock:^id(NSDate *date) {
  290. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  291. }];
  292. }
  293. @end
  294. @implementation AWSCognitoSyncListDatasetsRequest
  295. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  296. return @{
  297. @"identityId" : @"IdentityId",
  298. @"identityPoolId" : @"IdentityPoolId",
  299. @"maxResults" : @"MaxResults",
  300. @"nextToken" : @"NextToken",
  301. };
  302. }
  303. @end
  304. @implementation AWSCognitoSyncListDatasetsResponse
  305. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  306. return @{
  307. @"count" : @"Count",
  308. @"datasets" : @"Datasets",
  309. @"nextToken" : @"NextToken",
  310. };
  311. }
  312. + (NSValueTransformer *)datasetsJSONTransformer {
  313. return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoSyncDataset class]];
  314. }
  315. @end
  316. @implementation AWSCognitoSyncListIdentityPoolUsageRequest
  317. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  318. return @{
  319. @"maxResults" : @"MaxResults",
  320. @"nextToken" : @"NextToken",
  321. };
  322. }
  323. @end
  324. @implementation AWSCognitoSyncListIdentityPoolUsageResponse
  325. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  326. return @{
  327. @"count" : @"Count",
  328. @"identityPoolUsages" : @"IdentityPoolUsages",
  329. @"maxResults" : @"MaxResults",
  330. @"nextToken" : @"NextToken",
  331. };
  332. }
  333. + (NSValueTransformer *)identityPoolUsagesJSONTransformer {
  334. return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoSyncIdentityPoolUsage class]];
  335. }
  336. @end
  337. @implementation AWSCognitoSyncListRecordsRequest
  338. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  339. return @{
  340. @"datasetName" : @"DatasetName",
  341. @"identityId" : @"IdentityId",
  342. @"identityPoolId" : @"IdentityPoolId",
  343. @"lastSyncCount" : @"LastSyncCount",
  344. @"maxResults" : @"MaxResults",
  345. @"nextToken" : @"NextToken",
  346. @"syncSessionToken" : @"SyncSessionToken",
  347. };
  348. }
  349. @end
  350. @implementation AWSCognitoSyncListRecordsResponse
  351. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  352. return @{
  353. @"count" : @"Count",
  354. @"datasetDeletedAfterRequestedSyncCount" : @"DatasetDeletedAfterRequestedSyncCount",
  355. @"datasetExists" : @"DatasetExists",
  356. @"datasetSyncCount" : @"DatasetSyncCount",
  357. @"lastModifiedBy" : @"LastModifiedBy",
  358. @"mergedDatasetNames" : @"MergedDatasetNames",
  359. @"nextToken" : @"NextToken",
  360. @"records" : @"Records",
  361. @"syncSessionToken" : @"SyncSessionToken",
  362. };
  363. }
  364. + (NSValueTransformer *)recordsJSONTransformer {
  365. return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoSyncRecord class]];
  366. }
  367. @end
  368. @implementation AWSCognitoSyncPushSync
  369. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  370. return @{
  371. @"applicationArns" : @"ApplicationArns",
  372. @"roleArn" : @"RoleArn",
  373. };
  374. }
  375. @end
  376. @implementation AWSCognitoSyncRecord
  377. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  378. return @{
  379. @"deviceLastModifiedDate" : @"DeviceLastModifiedDate",
  380. @"key" : @"Key",
  381. @"lastModifiedBy" : @"LastModifiedBy",
  382. @"lastModifiedDate" : @"LastModifiedDate",
  383. @"syncCount" : @"SyncCount",
  384. @"value" : @"Value",
  385. };
  386. }
  387. + (NSValueTransformer *)deviceLastModifiedDateJSONTransformer {
  388. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  389. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  390. } reverseBlock:^id(NSDate *date) {
  391. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  392. }];
  393. }
  394. + (NSValueTransformer *)lastModifiedDateJSONTransformer {
  395. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  396. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  397. } reverseBlock:^id(NSDate *date) {
  398. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  399. }];
  400. }
  401. @end
  402. @implementation AWSCognitoSyncRecordPatch
  403. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  404. return @{
  405. @"deviceLastModifiedDate" : @"DeviceLastModifiedDate",
  406. @"key" : @"Key",
  407. @"op" : @"Op",
  408. @"syncCount" : @"SyncCount",
  409. @"value" : @"Value",
  410. };
  411. }
  412. + (NSValueTransformer *)deviceLastModifiedDateJSONTransformer {
  413. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
  414. return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
  415. } reverseBlock:^id(NSDate *date) {
  416. return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
  417. }];
  418. }
  419. + (NSValueTransformer *)opJSONTransformer {
  420. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
  421. if ([value isEqualToString:@"replace"]) {
  422. return @(AWSCognitoSyncOperationReplace);
  423. }
  424. if ([value isEqualToString:@"remove"]) {
  425. return @(AWSCognitoSyncOperationRemove);
  426. }
  427. return @(AWSCognitoSyncOperationUnknown);
  428. } reverseBlock:^NSString *(NSNumber *value) {
  429. switch ([value integerValue]) {
  430. case AWSCognitoSyncOperationReplace:
  431. return @"replace";
  432. case AWSCognitoSyncOperationRemove:
  433. return @"remove";
  434. default:
  435. return nil;
  436. }
  437. }];
  438. }
  439. @end
  440. @implementation AWSCognitoSyncRegisterDeviceRequest
  441. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  442. return @{
  443. @"identityId" : @"IdentityId",
  444. @"identityPoolId" : @"IdentityPoolId",
  445. @"platform" : @"Platform",
  446. @"token" : @"Token",
  447. };
  448. }
  449. + (NSValueTransformer *)platformJSONTransformer {
  450. return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
  451. if ([value isEqualToString:@"APNS"]) {
  452. return @(AWSCognitoSyncPlatformApns);
  453. }
  454. if ([value isEqualToString:@"APNS_SANDBOX"]) {
  455. return @(AWSCognitoSyncPlatformApnsSandbox);
  456. }
  457. if ([value isEqualToString:@"GCM"]) {
  458. return @(AWSCognitoSyncPlatformGcm);
  459. }
  460. if ([value isEqualToString:@"ADM"]) {
  461. return @(AWSCognitoSyncPlatformAdm);
  462. }
  463. return @(AWSCognitoSyncPlatformUnknown);
  464. } reverseBlock:^NSString *(NSNumber *value) {
  465. switch ([value integerValue]) {
  466. case AWSCognitoSyncPlatformApns:
  467. return @"APNS";
  468. case AWSCognitoSyncPlatformApnsSandbox:
  469. return @"APNS_SANDBOX";
  470. case AWSCognitoSyncPlatformGcm:
  471. return @"GCM";
  472. case AWSCognitoSyncPlatformAdm:
  473. return @"ADM";
  474. default:
  475. return nil;
  476. }
  477. }];
  478. }
  479. @end
  480. @implementation AWSCognitoSyncRegisterDeviceResponse
  481. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  482. return @{
  483. @"deviceId" : @"DeviceId",
  484. };
  485. }
  486. @end
  487. @implementation AWSCognitoSyncSetCognitoEventsRequest
  488. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  489. return @{
  490. @"events" : @"Events",
  491. @"identityPoolId" : @"IdentityPoolId",
  492. };
  493. }
  494. @end
  495. @implementation AWSCognitoSyncSetIdentityPoolConfigurationRequest
  496. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  497. return @{
  498. @"cognitoStreams" : @"CognitoStreams",
  499. @"identityPoolId" : @"IdentityPoolId",
  500. @"pushSync" : @"PushSync",
  501. };
  502. }
  503. + (NSValueTransformer *)cognitoStreamsJSONTransformer {
  504. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncCognitoStreams class]];
  505. }
  506. + (NSValueTransformer *)pushSyncJSONTransformer {
  507. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncPushSync class]];
  508. }
  509. @end
  510. @implementation AWSCognitoSyncSetIdentityPoolConfigurationResponse
  511. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  512. return @{
  513. @"cognitoStreams" : @"CognitoStreams",
  514. @"identityPoolId" : @"IdentityPoolId",
  515. @"pushSync" : @"PushSync",
  516. };
  517. }
  518. + (NSValueTransformer *)cognitoStreamsJSONTransformer {
  519. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncCognitoStreams class]];
  520. }
  521. + (NSValueTransformer *)pushSyncJSONTransformer {
  522. return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoSyncPushSync class]];
  523. }
  524. @end
  525. @implementation AWSCognitoSyncSubscribeToDatasetRequest
  526. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  527. return @{
  528. @"datasetName" : @"DatasetName",
  529. @"deviceId" : @"DeviceId",
  530. @"identityId" : @"IdentityId",
  531. @"identityPoolId" : @"IdentityPoolId",
  532. };
  533. }
  534. @end
  535. @implementation AWSCognitoSyncSubscribeToDatasetResponse
  536. @end
  537. @implementation AWSCognitoSyncUnsubscribeFromDatasetRequest
  538. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  539. return @{
  540. @"datasetName" : @"DatasetName",
  541. @"deviceId" : @"DeviceId",
  542. @"identityId" : @"IdentityId",
  543. @"identityPoolId" : @"IdentityPoolId",
  544. };
  545. }
  546. @end
  547. @implementation AWSCognitoSyncUnsubscribeFromDatasetResponse
  548. @end
  549. @implementation AWSCognitoSyncUpdateRecordsRequest
  550. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  551. return @{
  552. @"clientContext" : @"ClientContext",
  553. @"datasetName" : @"DatasetName",
  554. @"deviceId" : @"DeviceId",
  555. @"identityId" : @"IdentityId",
  556. @"identityPoolId" : @"IdentityPoolId",
  557. @"recordPatches" : @"RecordPatches",
  558. @"syncSessionToken" : @"SyncSessionToken",
  559. };
  560. }
  561. + (NSValueTransformer *)recordPatchesJSONTransformer {
  562. return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoSyncRecordPatch class]];
  563. }
  564. @end
  565. @implementation AWSCognitoSyncUpdateRecordsResponse
  566. + (NSDictionary *)JSONKeyPathsByPropertyKey {
  567. return @{
  568. @"records" : @"Records",
  569. };
  570. }
  571. + (NSValueTransformer *)recordsJSONTransformer {
  572. return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoSyncRecord class]];
  573. }
  574. @end