Skip to content

Commit e0de583

Browse files
This release adds support for the CarrierLookup API, which returns information about a destination phone number including if the number is valid, the carrier, and more.
1 parent d08b975 commit e0de583

File tree

56 files changed

+1034
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1034
-401
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.682
1+
1.11.683

generated/src/aws-cpp-sdk-pinpoint-sms-voice-v2/include/aws/pinpoint-sms-voice-v2/PinpointSMSVoiceV2Client.h

Lines changed: 89 additions & 66 deletions
Large diffs are not rendered by default.

generated/src/aws-cpp-sdk-pinpoint-sms-voice-v2/include/aws/pinpoint-sms-voice-v2/PinpointSMSVoiceV2ServiceClientModel.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/* Service model headers required in PinpointSMSVoiceV2Client header */
2222
#include <aws/pinpoint-sms-voice-v2/model/AssociateOriginationIdentityResult.h>
2323
#include <aws/pinpoint-sms-voice-v2/model/AssociateProtectConfigurationResult.h>
24+
#include <aws/pinpoint-sms-voice-v2/model/CarrierLookupResult.h>
2425
#include <aws/pinpoint-sms-voice-v2/model/CreateConfigurationSetResult.h>
2526
#include <aws/pinpoint-sms-voice-v2/model/CreateEventDestinationResult.h>
2627
#include <aws/pinpoint-sms-voice-v2/model/CreateOptOutListResult.h>
@@ -163,6 +164,7 @@ namespace Model {
163164
/* Service model forward declarations required in PinpointSMSVoiceV2Client header */
164165
class AssociateOriginationIdentityRequest;
165166
class AssociateProtectConfigurationRequest;
167+
class CarrierLookupRequest;
166168
class CreateConfigurationSetRequest;
167169
class CreateEventDestinationRequest;
168170
class CreateOptOutListRequest;
@@ -256,6 +258,7 @@ class VerifyDestinationNumberRequest;
256258
/* Service model Outcome class definitions */
257259
typedef Aws::Utils::Outcome<AssociateOriginationIdentityResult, PinpointSMSVoiceV2Error> AssociateOriginationIdentityOutcome;
258260
typedef Aws::Utils::Outcome<AssociateProtectConfigurationResult, PinpointSMSVoiceV2Error> AssociateProtectConfigurationOutcome;
261+
typedef Aws::Utils::Outcome<CarrierLookupResult, PinpointSMSVoiceV2Error> CarrierLookupOutcome;
259262
typedef Aws::Utils::Outcome<CreateConfigurationSetResult, PinpointSMSVoiceV2Error> CreateConfigurationSetOutcome;
260263
typedef Aws::Utils::Outcome<CreateEventDestinationResult, PinpointSMSVoiceV2Error> CreateEventDestinationOutcome;
261264
typedef Aws::Utils::Outcome<CreateOptOutListResult, PinpointSMSVoiceV2Error> CreateOptOutListOutcome;
@@ -361,6 +364,7 @@ typedef Aws::Utils::Outcome<VerifyDestinationNumberResult, PinpointSMSVoiceV2Err
361364
/* Service model Outcome callable definitions */
362365
typedef std::future<AssociateOriginationIdentityOutcome> AssociateOriginationIdentityOutcomeCallable;
363366
typedef std::future<AssociateProtectConfigurationOutcome> AssociateProtectConfigurationOutcomeCallable;
367+
typedef std::future<CarrierLookupOutcome> CarrierLookupOutcomeCallable;
364368
typedef std::future<CreateConfigurationSetOutcome> CreateConfigurationSetOutcomeCallable;
365369
typedef std::future<CreateEventDestinationOutcome> CreateEventDestinationOutcomeCallable;
366370
typedef std::future<CreateOptOutListOutcome> CreateOptOutListOutcomeCallable;
@@ -463,6 +467,9 @@ typedef std::function<void(const PinpointSMSVoiceV2Client*, const Model::Associa
463467
const Model::AssociateProtectConfigurationOutcome&,
464468
const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
465469
AssociateProtectConfigurationResponseReceivedHandler;
470+
typedef std::function<void(const PinpointSMSVoiceV2Client*, const Model::CarrierLookupRequest&, const Model::CarrierLookupOutcome&,
471+
const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
472+
CarrierLookupResponseReceivedHandler;
466473
typedef std::function<void(const PinpointSMSVoiceV2Client*, const Model::CreateConfigurationSetRequest&,
467474
const Model::CreateConfigurationSetOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
468475
CreateConfigurationSetResponseReceivedHandler;

generated/src/aws-cpp-sdk-pinpoint-sms-voice-v2/include/aws/pinpoint-sms-voice-v2/model/AssociateOriginationIdentityRequest.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ class AssociateOriginationIdentityRequest : public PinpointSMSVoiceV2Request {
3434
///@{
3535
/**
3636
* <p>The pool to update with the new Identity. This value can be either the PoolId
37-
* or PoolArn, and you can find these values using <a>DescribePools</a>.</p>
38-
* <p>If you are using a shared AWS End User Messaging SMS and Voice
39-
* resource then you must use the full Amazon Resource Name(ARN).</p>
37+
* or PoolArn, and you can find these values using <a
38+
* href="https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_DescribePools.html">DescribePools</a>.</p>
39+
* <p>If you are using a shared End User MessagingSMS; resource then
40+
* you must use the full Amazon Resource Name(ARN).</p>
4041
*/
4142
inline const Aws::String& GetPoolId() const { return m_poolId; }
4243
inline bool PoolIdHasBeenSet() const { return m_poolIdHasBeenSet; }
@@ -58,8 +59,8 @@ class AssociateOriginationIdentityRequest : public PinpointSMSVoiceV2Request {
5859
* SenderId, or SenderIdArn. You can use <a>DescribePhoneNumbers</a> to find the
5960
* values for PhoneNumberId and PhoneNumberArn, while <a>DescribeSenderIds</a> can
6061
* be used to get the values for SenderId and SenderIdArn.</p> <p>If
61-
* you are using a shared AWS End User Messaging SMS and Voice resource then you
62-
* must use the full Amazon Resource Name(ARN).</p>
62+
* you are using a shared End User MessagingSMS resource then you must use the full
63+
* Amazon Resource Name(ARN).</p>
6364
*/
6465
inline const Aws::String& GetOriginationIdentity() const { return m_originationIdentity; }
6566
inline bool OriginationIdentityHasBeenSet() const { return m_originationIdentityHasBeenSet; }
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/core/utils/memory/stl/AWSString.h>
8+
#include <aws/pinpoint-sms-voice-v2/PinpointSMSVoiceV2Request.h>
9+
#include <aws/pinpoint-sms-voice-v2/PinpointSMSVoiceV2_EXPORTS.h>
10+
11+
#include <utility>
12+
13+
namespace Aws {
14+
namespace PinpointSMSVoiceV2 {
15+
namespace Model {
16+
17+
/**
18+
*/
19+
class CarrierLookupRequest : public PinpointSMSVoiceV2Request {
20+
public:
21+
AWS_PINPOINTSMSVOICEV2_API CarrierLookupRequest() = default;
22+
23+
// Service request name is the Operation name which will send this request out,
24+
// each operation should has unique request name, so that we can get operation's name from this request.
25+
// Note: this is not true for response, multiple operations may have the same response name,
26+
// so we can not get operation's name from response.
27+
inline virtual const char* GetServiceRequestName() const override { return "CarrierLookup"; }
28+
29+
AWS_PINPOINTSMSVOICEV2_API Aws::String SerializePayload() const override;
30+
31+
AWS_PINPOINTSMSVOICEV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
32+
33+
///@{
34+
/**
35+
* <p>The phone number that you want to retrieve information about. You can provide
36+
* the phone number in various formats including special characters such as
37+
* parentheses, brackets, spaces, hyphens, periods, and commas. The service
38+
* automatically converts the input to E164 format for processing.</p>
39+
*/
40+
inline const Aws::String& GetPhoneNumber() const { return m_phoneNumber; }
41+
inline bool PhoneNumberHasBeenSet() const { return m_phoneNumberHasBeenSet; }
42+
template <typename PhoneNumberT = Aws::String>
43+
void SetPhoneNumber(PhoneNumberT&& value) {
44+
m_phoneNumberHasBeenSet = true;
45+
m_phoneNumber = std::forward<PhoneNumberT>(value);
46+
}
47+
template <typename PhoneNumberT = Aws::String>
48+
CarrierLookupRequest& WithPhoneNumber(PhoneNumberT&& value) {
49+
SetPhoneNumber(std::forward<PhoneNumberT>(value));
50+
return *this;
51+
}
52+
///@}
53+
private:
54+
Aws::String m_phoneNumber;
55+
bool m_phoneNumberHasBeenSet = false;
56+
};
57+
58+
} // namespace Model
59+
} // namespace PinpointSMSVoiceV2
60+
} // namespace Aws
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/core/utils/memory/stl/AWSString.h>
8+
#include <aws/pinpoint-sms-voice-v2/PinpointSMSVoiceV2_EXPORTS.h>
9+
#include <aws/pinpoint-sms-voice-v2/model/PhoneNumberType.h>
10+
11+
#include <utility>
12+
13+
namespace Aws {
14+
template <typename RESULT_TYPE>
15+
class AmazonWebServiceResult;
16+
17+
namespace Utils {
18+
namespace Json {
19+
class JsonValue;
20+
} // namespace Json
21+
} // namespace Utils
22+
namespace PinpointSMSVoiceV2 {
23+
namespace Model {
24+
class CarrierLookupResult {
25+
public:
26+
AWS_PINPOINTSMSVOICEV2_API CarrierLookupResult() = default;
27+
AWS_PINPOINTSMSVOICEV2_API CarrierLookupResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
28+
AWS_PINPOINTSMSVOICEV2_API CarrierLookupResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
29+
30+
///@{
31+
/**
32+
* <p>The phone number in E164 format, sanitized from the original input by
33+
* removing any formatting characters.</p>
34+
*/
35+
inline const Aws::String& GetE164PhoneNumber() const { return m_e164PhoneNumber; }
36+
template <typename E164PhoneNumberT = Aws::String>
37+
void SetE164PhoneNumber(E164PhoneNumberT&& value) {
38+
m_e164PhoneNumberHasBeenSet = true;
39+
m_e164PhoneNumber = std::forward<E164PhoneNumberT>(value);
40+
}
41+
template <typename E164PhoneNumberT = Aws::String>
42+
CarrierLookupResult& WithE164PhoneNumber(E164PhoneNumberT&& value) {
43+
SetE164PhoneNumber(std::forward<E164PhoneNumberT>(value));
44+
return *this;
45+
}
46+
///@}
47+
48+
///@{
49+
/**
50+
* <p>The numeric dialing code for the country or region where the phone number was
51+
* originally registered.</p>
52+
*/
53+
inline const Aws::String& GetDialingCountryCode() const { return m_dialingCountryCode; }
54+
template <typename DialingCountryCodeT = Aws::String>
55+
void SetDialingCountryCode(DialingCountryCodeT&& value) {
56+
m_dialingCountryCodeHasBeenSet = true;
57+
m_dialingCountryCode = std::forward<DialingCountryCodeT>(value);
58+
}
59+
template <typename DialingCountryCodeT = Aws::String>
60+
CarrierLookupResult& WithDialingCountryCode(DialingCountryCodeT&& value) {
61+
SetDialingCountryCode(std::forward<DialingCountryCodeT>(value));
62+
return *this;
63+
}
64+
///@}
65+
66+
///@{
67+
/**
68+
* <p>The two-character code, in ISO 3166-1 alpha-2 format, for the country or
69+
* region where the phone number was originally registered.</p>
70+
*/
71+
inline const Aws::String& GetIsoCountryCode() const { return m_isoCountryCode; }
72+
template <typename IsoCountryCodeT = Aws::String>
73+
void SetIsoCountryCode(IsoCountryCodeT&& value) {
74+
m_isoCountryCodeHasBeenSet = true;
75+
m_isoCountryCode = std::forward<IsoCountryCodeT>(value);
76+
}
77+
template <typename IsoCountryCodeT = Aws::String>
78+
CarrierLookupResult& WithIsoCountryCode(IsoCountryCodeT&& value) {
79+
SetIsoCountryCode(std::forward<IsoCountryCodeT>(value));
80+
return *this;
81+
}
82+
///@}
83+
84+
///@{
85+
/**
86+
* <p>The name of the country where the phone number was originally registered.</p>
87+
*/
88+
inline const Aws::String& GetCountry() const { return m_country; }
89+
template <typename CountryT = Aws::String>
90+
void SetCountry(CountryT&& value) {
91+
m_countryHasBeenSet = true;
92+
m_country = std::forward<CountryT>(value);
93+
}
94+
template <typename CountryT = Aws::String>
95+
CarrierLookupResult& WithCountry(CountryT&& value) {
96+
SetCountry(std::forward<CountryT>(value));
97+
return *this;
98+
}
99+
///@}
100+
101+
///@{
102+
/**
103+
* <p>The phone number's mobile country code, for mobile phone number types</p>
104+
*/
105+
inline const Aws::String& GetMCC() const { return m_mCC; }
106+
template <typename MCCT = Aws::String>
107+
void SetMCC(MCCT&& value) {
108+
m_mCCHasBeenSet = true;
109+
m_mCC = std::forward<MCCT>(value);
110+
}
111+
template <typename MCCT = Aws::String>
112+
CarrierLookupResult& WithMCC(MCCT&& value) {
113+
SetMCC(std::forward<MCCT>(value));
114+
return *this;
115+
}
116+
///@}
117+
118+
///@{
119+
/**
120+
* <p>The phone number's mobile network code, for mobile phone number types.</p>
121+
*/
122+
inline const Aws::String& GetMNC() const { return m_mNC; }
123+
template <typename MNCT = Aws::String>
124+
void SetMNC(MNCT&& value) {
125+
m_mNCHasBeenSet = true;
126+
m_mNC = std::forward<MNCT>(value);
127+
}
128+
template <typename MNCT = Aws::String>
129+
CarrierLookupResult& WithMNC(MNCT&& value) {
130+
SetMNC(std::forward<MNCT>(value));
131+
return *this;
132+
}
133+
///@}
134+
135+
///@{
136+
/**
137+
* <p>The carrier or service provider that the phone number is currently registered
138+
* with. In some countries and regions, this value may be the carrier or service
139+
* provider that the phone number was originally registered with.</p>
140+
*/
141+
inline const Aws::String& GetCarrier() const { return m_carrier; }
142+
template <typename CarrierT = Aws::String>
143+
void SetCarrier(CarrierT&& value) {
144+
m_carrierHasBeenSet = true;
145+
m_carrier = std::forward<CarrierT>(value);
146+
}
147+
template <typename CarrierT = Aws::String>
148+
CarrierLookupResult& WithCarrier(CarrierT&& value) {
149+
SetCarrier(std::forward<CarrierT>(value));
150+
return *this;
151+
}
152+
///@}
153+
154+
///@{
155+
/**
156+
* <p>Describes the type of phone number. Valid values are: MOBILE, LANDLINE,
157+
* OTHER, and INVALID. Avoid sending SMS or voice messages to INVALID phone
158+
* numbers, as these numbers are unlikely to belong to actual recipients.</p>
159+
*/
160+
inline PhoneNumberType GetPhoneNumberType() const { return m_phoneNumberType; }
161+
inline void SetPhoneNumberType(PhoneNumberType value) {
162+
m_phoneNumberTypeHasBeenSet = true;
163+
m_phoneNumberType = value;
164+
}
165+
inline CarrierLookupResult& WithPhoneNumberType(PhoneNumberType value) {
166+
SetPhoneNumberType(value);
167+
return *this;
168+
}
169+
///@}
170+
171+
///@{
172+
173+
inline const Aws::String& GetRequestId() const { return m_requestId; }
174+
template <typename RequestIdT = Aws::String>
175+
void SetRequestId(RequestIdT&& value) {
176+
m_requestIdHasBeenSet = true;
177+
m_requestId = std::forward<RequestIdT>(value);
178+
}
179+
template <typename RequestIdT = Aws::String>
180+
CarrierLookupResult& WithRequestId(RequestIdT&& value) {
181+
SetRequestId(std::forward<RequestIdT>(value));
182+
return *this;
183+
}
184+
///@}
185+
private:
186+
Aws::String m_e164PhoneNumber;
187+
bool m_e164PhoneNumberHasBeenSet = false;
188+
189+
Aws::String m_dialingCountryCode;
190+
bool m_dialingCountryCodeHasBeenSet = false;
191+
192+
Aws::String m_isoCountryCode;
193+
bool m_isoCountryCodeHasBeenSet = false;
194+
195+
Aws::String m_country;
196+
bool m_countryHasBeenSet = false;
197+
198+
Aws::String m_mCC;
199+
bool m_mCCHasBeenSet = false;
200+
201+
Aws::String m_mNC;
202+
bool m_mNCHasBeenSet = false;
203+
204+
Aws::String m_carrier;
205+
bool m_carrierHasBeenSet = false;
206+
207+
PhoneNumberType m_phoneNumberType{PhoneNumberType::NOT_SET};
208+
bool m_phoneNumberTypeHasBeenSet = false;
209+
210+
Aws::String m_requestId;
211+
bool m_requestIdHasBeenSet = false;
212+
};
213+
214+
} // namespace Model
215+
} // namespace PinpointSMSVoiceV2
216+
} // namespace Aws

generated/src/aws-cpp-sdk-pinpoint-sms-voice-v2/include/aws/pinpoint-sms-voice-v2/model/CreateEventDestinationRequest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class CreateEventDestinationRequest : public PinpointSMSVoiceV2Request {
7777
///@{
7878
/**
7979
* <p>An array of event types that determine which events to log. If "ALL" is used,
80-
* then AWS End User Messaging SMS and Voice logs every event type.</p>
81-
* <p>The <code>TEXT_SENT</code> event type is not supported.</p>
80+
* then End User MessagingSMS logs every event type.</p> <p>The
81+
* <code>TEXT_SENT</code> event type is not supported.</p>
8282
*/
8383
inline const Aws::Vector<EventType>& GetMatchingEventTypes() const { return m_matchingEventTypes; }
8484
inline bool MatchingEventTypesHasBeenSet() const { return m_matchingEventTypesHasBeenSet; }

generated/src/aws-cpp-sdk-pinpoint-sms-voice-v2/include/aws/pinpoint-sms-voice-v2/model/CreatePoolRequest.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ class CreatePoolRequest : public PinpointSMSVoiceV2Request {
3737
///@{
3838
/**
3939
* <p>The origination identity to use such as a PhoneNumberId, PhoneNumberArn,
40-
* SenderId or SenderIdArn. You can use <a>DescribePhoneNumbers</a> to find the
41-
* values for PhoneNumberId and PhoneNumberArn while <a>DescribeSenderIds</a> can
42-
* be used to get the values for SenderId and SenderIdArn.</p> <p>After the pool is
43-
* created you can add more origination identities to the pool by using <a
40+
* SenderId or SenderIdArn. You can use <a
41+
* href="https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_DescribePhoneNumbers.html">DescribePhoneNumbers</a>
42+
* to find the values for PhoneNumberId and PhoneNumberArn, and use <a
43+
* href="https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_DescribeSenderIds.html">DescribeSenderIds</a>
44+
* can be used to get the values for SenderId and SenderIdArn.</p> <p>After the
45+
* pool is created you can add more origination identities to the pool by using <a
4446
* href="https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_AssociateOriginationIdentity.html">AssociateOriginationIdentity</a>.</p>
45-
* <p>If you are using a shared AWS End User Messaging SMS and Voice
46-
* resource then you must use the full Amazon Resource Name(ARN).</p>
47+
* <p>If you are using a shared End User MessagingSMS resource then you
48+
* must use the full Amazon Resource Name(ARN).</p>
4749
*/
4850
inline const Aws::String& GetOriginationIdentity() const { return m_originationIdentity; }
4951
inline bool OriginationIdentityHasBeenSet() const { return m_originationIdentityHasBeenSet; }
@@ -99,7 +101,9 @@ class CreatePoolRequest : public PinpointSMSVoiceV2Request {
99101
///@{
100102
/**
101103
* <p>By default this is set to false. When set to true the pool can't be deleted.
102-
* You can change this value using the <a>UpdatePool</a> action.</p>
104+
* You can change this value using the <a
105+
* href="https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_UpdatePool.html">UpdatePool</a>
106+
* action.</p>
103107
*/
104108
inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
105109
inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }

0 commit comments

Comments
 (0)