Skip to content

Commit

Permalink
feat(AWSConnect): update models to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
awsmobilesdk committed Oct 3, 2023
1 parent 4e8df0b commit b630bb4
Show file tree
Hide file tree
Showing 7 changed files with 692 additions and 47 deletions.
174 changes: 160 additions & 14 deletions AWSConnect/AWSConnectModel.h

Large diffs are not rendered by default.

216 changes: 216 additions & 0 deletions AWSConnect/AWSConnectModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,21 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {

@end

@implementation AWSConnectApplication

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"applicationPermissions" : @"ApplicationPermissions",
@"namespace" : @"Namespace",
};
}

@end

@implementation AWSConnectAssignContactCategoryActionDefinition

+ (BOOL)supportsSecureCoding {
Expand Down Expand Up @@ -4448,6 +4463,9 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
if ([value caseInsensitiveCompare:@"CASES_DOMAIN"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeCasesDomain);
}
if ([value caseInsensitiveCompare:@"APPLICATION"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeApplication);
}
return @(AWSConnectIntegrationTypeUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -4463,6 +4481,8 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
return @"WISDOM_KNOWLEDGE_BASE";
case AWSConnectIntegrationTypeCasesDomain:
return @"CASES_DOMAIN";
case AWSConnectIntegrationTypeApplication:
return @"APPLICATION";
default:
return nil;
}
Expand Down Expand Up @@ -4795,6 +4815,7 @@ + (BOOL)supportsSecureCoding {
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"allowedAccessControlTags" : @"AllowedAccessControlTags",
@"applications" : @"Applications",
@"detail" : @"Description",
@"instanceId" : @"InstanceId",
@"permissions" : @"Permissions",
Expand All @@ -4804,6 +4825,10 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
};
}

+ (NSValueTransformer *)applicationsJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectApplication class]];
}

@end

@implementation AWSConnectCreateSecurityProfileResponse
Expand Down Expand Up @@ -8627,6 +8652,7 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
@"endTime" : @"EndTime",
@"filters" : @"Filters",
@"groupings" : @"Groupings",
@"interval" : @"Interval",
@"maxResults" : @"MaxResults",
@"metrics" : @"Metrics",
@"nextToken" : @"NextToken",
Expand All @@ -8647,6 +8673,10 @@ + (NSValueTransformer *)filtersJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectFilterV2 class]];
}

+ (NSValueTransformer *)intervalJSONTransformer {
return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSConnectIntervalDetails class]];
}

+ (NSValueTransformer *)metricsJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectMetricV2 class]];
}
Expand Down Expand Up @@ -9828,6 +9858,9 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
if ([value caseInsensitiveCompare:@"CASES_DOMAIN"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeCasesDomain);
}
if ([value caseInsensitiveCompare:@"APPLICATION"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeApplication);
}
return @(AWSConnectIntegrationTypeUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -9843,6 +9876,8 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
return @"WISDOM_KNOWLEDGE_BASE";
case AWSConnectIntegrationTypeCasesDomain:
return @"CASES_DOMAIN";
case AWSConnectIntegrationTypeApplication:
return @"APPLICATION";
default:
return nil;
}
Expand Down Expand Up @@ -9872,6 +9907,62 @@ + (NSValueTransformer *)sourceTypeJSONTransformer {

@end

@implementation AWSConnectIntervalDetails

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"intervalPeriod" : @"IntervalPeriod",
@"timeZone" : @"TimeZone",
};
}

+ (NSValueTransformer *)intervalPeriodJSONTransformer {
return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
if ([value caseInsensitiveCompare:@"FIFTEEN_MIN"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodFifteenMin);
}
if ([value caseInsensitiveCompare:@"THIRTY_MIN"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodThirtyMin);
}
if ([value caseInsensitiveCompare:@"HOUR"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodHour);
}
if ([value caseInsensitiveCompare:@"DAY"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodDay);
}
if ([value caseInsensitiveCompare:@"WEEK"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodWeek);
}
if ([value caseInsensitiveCompare:@"TOTAL"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodTotal);
}
return @(AWSConnectIntervalPeriodUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
case AWSConnectIntervalPeriodFifteenMin:
return @"FIFTEEN_MIN";
case AWSConnectIntervalPeriodThirtyMin:
return @"THIRTY_MIN";
case AWSConnectIntervalPeriodHour:
return @"HOUR";
case AWSConnectIntervalPeriodDay:
return @"DAY";
case AWSConnectIntervalPeriodWeek:
return @"WEEK";
case AWSConnectIntervalPeriodTotal:
return @"TOTAL";
default:
return nil;
}
}];
}

@end

@implementation AWSConnectInvisibleFieldInfo

+ (BOOL)supportsSecureCoding {
Expand Down Expand Up @@ -10747,6 +10838,9 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
if ([value caseInsensitiveCompare:@"CASES_DOMAIN"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeCasesDomain);
}
if ([value caseInsensitiveCompare:@"APPLICATION"] == NSOrderedSame) {
return @(AWSConnectIntegrationTypeApplication);
}
return @(AWSConnectIntegrationTypeUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -10762,6 +10856,8 @@ + (NSValueTransformer *)integrationTypeJSONTransformer {
return @"WISDOM_KNOWLEDGE_BASE";
case AWSConnectIntegrationTypeCasesDomain:
return @"CASES_DOMAIN";
case AWSConnectIntegrationTypeApplication:
return @"APPLICATION";
default:
return nil;
}
Expand Down Expand Up @@ -12544,6 +12640,42 @@ + (NSValueTransformer *)securityKeysJSONTransformer {

@end

@implementation AWSConnectListSecurityProfileApplicationsRequest

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"instanceId" : @"InstanceId",
@"maxResults" : @"MaxResults",
@"nextToken" : @"NextToken",
@"securityProfileId" : @"SecurityProfileId",
};
}

@end

@implementation AWSConnectListSecurityProfileApplicationsResponse

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"applications" : @"Applications",
@"nextToken" : @"NextToken",
};
}

+ (NSValueTransformer *)applicationsJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectApplication class]];
}

@end

@implementation AWSConnectListSecurityProfilePermissionsRequest

+ (BOOL)supportsSecureCoding {
Expand Down Expand Up @@ -13041,11 +13173,85 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"metricFilterKey" : @"MetricFilterKey",
@"metricFilterValues" : @"MetricFilterValues",
@"negate" : @"Negate",
};
}

@end

@implementation AWSConnectMetricInterval

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"endTime" : @"EndTime",
@"interval" : @"Interval",
@"startTime" : @"StartTime",
};
}

+ (NSValueTransformer *)endTimeJSONTransformer {
return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
} reverseBlock:^id(NSDate *date) {
return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
}];
}

+ (NSValueTransformer *)intervalJSONTransformer {
return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
if ([value caseInsensitiveCompare:@"FIFTEEN_MIN"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodFifteenMin);
}
if ([value caseInsensitiveCompare:@"THIRTY_MIN"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodThirtyMin);
}
if ([value caseInsensitiveCompare:@"HOUR"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodHour);
}
if ([value caseInsensitiveCompare:@"DAY"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodDay);
}
if ([value caseInsensitiveCompare:@"WEEK"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodWeek);
}
if ([value caseInsensitiveCompare:@"TOTAL"] == NSOrderedSame) {
return @(AWSConnectIntervalPeriodTotal);
}
return @(AWSConnectIntervalPeriodUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
case AWSConnectIntervalPeriodFifteenMin:
return @"FIFTEEN_MIN";
case AWSConnectIntervalPeriodThirtyMin:
return @"THIRTY_MIN";
case AWSConnectIntervalPeriodHour:
return @"HOUR";
case AWSConnectIntervalPeriodDay:
return @"DAY";
case AWSConnectIntervalPeriodWeek:
return @"WEEK";
case AWSConnectIntervalPeriodTotal:
return @"TOTAL";
default:
return nil;
}
}];
}

+ (NSValueTransformer *)startTimeJSONTransformer {
return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) {
return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]];
} reverseBlock:^id(NSDate *date) {
return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]];
}];
}

@end

@implementation AWSConnectMetricResultV2

+ (BOOL)supportsSecureCoding {
Expand All @@ -13056,13 +13262,18 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"collections" : @"Collections",
@"dimensions" : @"Dimensions",
@"metricInterval" : @"MetricInterval",
};
}

+ (NSValueTransformer *)collectionsJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectMetricDataV2 class]];
}

+ (NSValueTransformer *)metricIntervalJSONTransformer {
return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSConnectMetricInterval class]];
}

@end

@implementation AWSConnectMetricV2
Expand Down Expand Up @@ -20233,6 +20444,7 @@ + (BOOL)supportsSecureCoding {
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"allowedAccessControlTags" : @"AllowedAccessControlTags",
@"applications" : @"Applications",
@"detail" : @"Description",
@"instanceId" : @"InstanceId",
@"permissions" : @"Permissions",
Expand All @@ -20241,6 +20453,10 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
};
}

+ (NSValueTransformer *)applicationsJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSConnectApplication class]];
}

@end

@implementation AWSConnectUpdateTaskTemplateRequest
Expand Down
Loading

0 comments on commit b630bb4

Please sign in to comment.