Skip to content

Commit

Permalink
feat(AWSPinpoint): update models to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
awsmobilesdk authored and sebaland committed Jun 7, 2024
1 parent 70872d2 commit 0ec217a
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 14 deletions.
2 changes: 1 addition & 1 deletion AWSPinpoint.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Pod::Spec.new do |s|
s.dependency 'AWSCore', '2.36.3'
s.source_files = 'AWSPinpoint/*.{h,m}', 'AWSPinpoint/**/*.{h,m}'
s.private_header_files = 'AWSPinpoint/Internal/*.h'
s.resource_bundle = { 'AWSPinpoint' => ['AWSPinpoint/PrivacyInfo.xcprivacy']}
s.resource_bundle = { 'AWSPinpointTargeting' => ['AWSPinpointTargeting/PrivacyInfo.xcprivacy'] }
end
2 changes: 1 addition & 1 deletion AWSPinpoint/AWSPinpointTargeting/AWSPinpointTargeting.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
Expand Down
55 changes: 52 additions & 3 deletions AWSPinpoint/AWSPinpointTargeting/AWSPinpointTargetingModel.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -641,6 +641,7 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
@class AWSPinpointTargetingSetDimension;
@class AWSPinpointTargetingSimpleCondition;
@class AWSPinpointTargetingSimpleEmail;
@class AWSPinpointTargetingMessageHeader;
@class AWSPinpointTargetingSimpleEmailPart;
@class AWSPinpointTargetingStartCondition;
@class AWSPinpointTargetingTagResourceRequest;
Expand Down Expand Up @@ -2208,6 +2209,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
*/
@property (nonatomic, strong) NSString * _Nullable fromAddress;

/**
<p>The list of <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-campaigns-campaign-id.html#apps-application-id-campaigns-campaign-id-model-messageheader">MessageHeaders</a> for the email. You can have up to 15 MessageHeaders for each email.</p>
*/
@property (nonatomic, strong) NSArray<AWSPinpointTargetingMessageHeader *> * _Nullable headers;

/**
<p>The body of the email, in HTML format, for recipients whose email clients render HTML content.</p>
*/
Expand Down Expand Up @@ -4029,6 +4035,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
*/
@property (nonatomic, strong) NSString * _Nullable identity;

/**
<p>The ARN of an IAM role for Amazon Pinpoint to use to send email from your campaigns or journeys through Amazon SES.</p>
*/
@property (nonatomic, strong) NSString * _Nullable orchestrationSendingRoleArn;

/**
<p>The ARN of the AWS Identity and Access Management (IAM) role that you want Amazon Pinpoint to use when it submits email-related event data for the channel.</p>
*/
Expand Down Expand Up @@ -4103,6 +4114,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
*/
@property (nonatomic, strong) NSNumber * _Nullable messagesPerSecond;

/**
<p>The ARN of an IAM role for Amazon Pinpoint to use to send email from your campaigns or journeys through Amazon SES.</p>
*/
@property (nonatomic, strong) NSString * _Nullable orchestrationSendingRoleArn;

/**
<p>The type of messaging or notification platform for the channel. For the email channel, this value is EMAIL.</p>
*/
Expand Down Expand Up @@ -4202,6 +4218,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
*/
@property (nonatomic, strong) NSString * _Nullable defaultSubstitutions;

/**
<p>The list of <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/templates-template-name-email.html#templates-template-name-email-model-messageheader">MessageHeaders</a> for the email. You can have up to 15 Headers.</p>
*/
@property (nonatomic, strong) NSArray<AWSPinpointTargetingMessageHeader *> * _Nullable headers;

/**
<p>The message body, in HTML format, to use in email messages that are based on the message template. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
*/
Expand Down Expand Up @@ -4256,6 +4277,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
*/
@property (nonatomic, strong) NSString * _Nullable defaultSubstitutions;

/**
<p>The list of <a href="https://docs.aws.amazon.com/pinpoint/latest/apireference/templates-template-name-email.html#templates-template-name-email-model-messageheader">MessageHeaders</a> for the email. You can have up to 15 Headers.</p>
*/
@property (nonatomic, strong) NSArray<AWSPinpointTargetingMessageHeader *> * _Nullable headers;

/**
<p>The message body, in HTML format, that's used in email messages that are based on the message template.</p>
*/
Expand Down Expand Up @@ -4507,7 +4533,7 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
@property (nonatomic, strong) NSString * _Nullable address;

/**
<p>The delivery status of the message. Possible values are:</p><ul><li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li><li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li><li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li><li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li></ul>
<p>The delivery status of the message. Possible values are:</p><ul><li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>OPT_OUT - The user who's associated with the endpoint has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>SUCCESSFUL - The message was successfully delivered to the endpoint.</p></li><li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint.</p></li><li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li></ul>
*/
@property (nonatomic, assign) AWSPinpointTargetingDeliveryStatus deliveryStatus;

Expand Down Expand Up @@ -8519,7 +8545,7 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {


/**
<p>The delivery status of the message. Possible values are:</p><ul><li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li><li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li><li><p>TIMEOUT - The message couldn't be sent within the timeout period.</p></li><li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li></ul>
<p>The delivery status of the message. Possible values are:</p><ul><li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>OPT_OUT - The user who's associated with the endpoint address has opted out of receiving messages from you. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>PERMANENT_FAILURE - An error occurred when delivering the message to the endpoint address. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>SUCCESSFUL - The message was successfully delivered to the endpoint address.</p></li><li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't attempt to send the message again.</p></li><li><p>THROTTLED - Amazon Pinpoint throttled the operation to send the message to the endpoint address.</p></li><li><p>UNKNOWN_FAILURE - An unknown error occurred.</p></li></ul>
*/
@property (nonatomic, assign) AWSPinpointTargetingDeliveryStatus deliveryStatus;

Expand Down Expand Up @@ -10194,6 +10220,11 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {
@interface AWSPinpointTargetingSimpleEmail : AWSModel


/**
<p>The list of MessageHeaders for the email. You can have up to 15 Headers.</p>
*/
@property (nonatomic, strong) NSArray<AWSPinpointTargetingMessageHeader *> * _Nullable headers;

/**
<p>The body of the email message, in HTML format. We recommend using HTML format for email clients that render HTML content. You can include links, formatted text, and more in an HTML message.</p>
*/
Expand All @@ -10211,6 +10242,24 @@ typedef NS_ENUM(NSInteger, AWSPinpointTargetingDayOfWeek) {

@end

/**
<p>Contains the name and value pair of an email header to add to your email. You can have up to 15 MessageHeaders. A header can contain information such as the sender, receiver, route, or timestamp.</p>
*/
@interface AWSPinpointTargetingMessageHeader : AWSModel


/**
<p>The name of the message header. The header name can contain up to 126 characters.</p>
*/
@property (nonatomic, strong) NSString * _Nullable name;

/**
<p>The value of the message header. The header value can contain up to 870 characters, including the length of any rendered attributes. For example if you add the {CreationDate} attribute, it renders as YYYY-MM-DDTHH:MM:SS.SSSZ and is 24 characters in length.</p>
*/
@property (nonatomic, strong) NSString * _Nullable value;

@end

/**
<p>Specifies the subject or body of an email message, represented as textual email data and the applicable character set.</p>
*/
Expand Down
39 changes: 38 additions & 1 deletion AWSPinpoint/AWSPinpointTargeting/AWSPinpointTargetingModel.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1035,11 +1035,16 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"body" : @"Body",
@"fromAddress" : @"FromAddress",
@"headers" : @"Headers",
@"htmlBody" : @"HtmlBody",
@"title" : @"Title",
};
}

+ (NSValueTransformer *)headersJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSPinpointTargetingMessageHeader class]];
}

@end

@implementation AWSPinpointTargetingCampaignEventFilter
Expand Down Expand Up @@ -3014,6 +3019,7 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
@"enabled" : @"Enabled",
@"fromAddress" : @"FromAddress",
@"identity" : @"Identity",
@"orchestrationSendingRoleArn" : @"OrchestrationSendingRoleArn",
@"roleArn" : @"RoleArn",
};
}
Expand All @@ -3040,6 +3046,7 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
@"lastModifiedBy" : @"LastModifiedBy",
@"lastModifiedDate" : @"LastModifiedDate",
@"messagesPerSecond" : @"MessagesPerSecond",
@"orchestrationSendingRoleArn" : @"OrchestrationSendingRoleArn",
@"platform" : @"Platform",
@"roleArn" : @"RoleArn",
@"version" : @"Version",
Expand Down Expand Up @@ -3106,6 +3113,7 @@ + (BOOL)supportsSecureCoding {
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"defaultSubstitutions" : @"DefaultSubstitutions",
@"headers" : @"Headers",
@"htmlPart" : @"HtmlPart",
@"recommenderId" : @"RecommenderId",
@"subject" : @"Subject",
Expand All @@ -3115,6 +3123,10 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
};
}

+ (NSValueTransformer *)headersJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSPinpointTargetingMessageHeader class]];
}

@end

@implementation AWSPinpointTargetingEmailTemplateResponse
Expand All @@ -3128,6 +3140,7 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
@"arn" : @"Arn",
@"creationDate" : @"CreationDate",
@"defaultSubstitutions" : @"DefaultSubstitutions",
@"headers" : @"Headers",
@"htmlPart" : @"HtmlPart",
@"lastModifiedDate" : @"LastModifiedDate",
@"recommenderId" : @"RecommenderId",
Expand All @@ -3141,6 +3154,10 @@ + (NSDictionary *)JSONKeyPathsByPropertyKey {
};
}

+ (NSValueTransformer *)headersJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSPinpointTargetingMessageHeader class]];
}

+ (NSValueTransformer *)templateTypeJSONTransformer {
return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) {
if ([value caseInsensitiveCompare:@"EMAIL"] == NSOrderedSame) {
Expand Down Expand Up @@ -9238,12 +9255,17 @@ + (BOOL)supportsSecureCoding {

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"headers" : @"Headers",
@"htmlPart" : @"HtmlPart",
@"subject" : @"Subject",
@"textPart" : @"TextPart",
};
}

+ (NSValueTransformer *)headersJSONTransformer {
return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSPinpointTargetingMessageHeader class]];
}

+ (NSValueTransformer *)htmlPartJSONTransformer {
return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSPinpointTargetingSimpleEmailPart class]];
}
Expand All @@ -9258,6 +9280,21 @@ + (NSValueTransformer *)textPartJSONTransformer {

@end

@implementation AWSPinpointTargetingMessageHeader

+ (BOOL)supportsSecureCoding {
return YES;
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{
@"name" : @"Name",
@"value" : @"Value",
};
}

@end

@implementation AWSPinpointTargetingSimpleEmailPart

+ (BOOL)supportsSecureCoding {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2010-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License").
// You may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 0ec217a

Please sign in to comment.