@@ -121,6 +121,16 @@ final class SendEmailRequest extends Input
121
121
*/
122
122
private $ endpointId ;
123
123
124
+ /**
125
+ * The name of the tenant through which this email will be sent.
126
+ *
127
+ * > The email sending operation will only succeed if all referenced resources (identities, configuration sets, and
128
+ * > templates) are associated with this tenant.
129
+ *
130
+ * @var string|null
131
+ */
132
+ private $ tenantName ;
133
+
124
134
/**
125
135
* An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to
126
136
* unsubscribe.
@@ -141,6 +151,7 @@ final class SendEmailRequest extends Input
141
151
* EmailTags?: null|array<MessageTag|array>,
142
152
* ConfigurationSetName?: null|string,
143
153
* EndpointId?: null|string,
154
+ * TenantName?: null|string,
144
155
* ListManagementOptions?: null|ListManagementOptions|array,
145
156
* '@region'?: string|null,
146
157
* } $input
@@ -157,6 +168,7 @@ public function __construct(array $input = [])
157
168
$ this ->emailTags = isset ($ input ['EmailTags ' ]) ? array_map ([MessageTag::class, 'create ' ], $ input ['EmailTags ' ]) : null ;
158
169
$ this ->configurationSetName = $ input ['ConfigurationSetName ' ] ?? null ;
159
170
$ this ->endpointId = $ input ['EndpointId ' ] ?? null ;
171
+ $ this ->tenantName = $ input ['TenantName ' ] ?? null ;
160
172
$ this ->listManagementOptions = isset ($ input ['ListManagementOptions ' ]) ? ListManagementOptions::create ($ input ['ListManagementOptions ' ]) : null ;
161
173
parent ::__construct ($ input );
162
174
}
@@ -173,6 +185,7 @@ public function __construct(array $input = [])
173
185
* EmailTags?: null|array<MessageTag|array>,
174
186
* ConfigurationSetName?: null|string,
175
187
* EndpointId?: null|string,
188
+ * TenantName?: null|string,
176
189
* ListManagementOptions?: null|ListManagementOptions|array,
177
190
* '@region'?: string|null,
178
191
* }|SendEmailRequest $input
@@ -243,6 +256,11 @@ public function getReplyToAddresses(): array
243
256
return $ this ->replyToAddresses ?? [];
244
257
}
245
258
259
+ public function getTenantName (): ?string
260
+ {
261
+ return $ this ->tenantName ;
262
+ }
263
+
246
264
/**
247
265
* @internal
248
266
*/
@@ -351,6 +369,13 @@ public function setReplyToAddresses(array $value): self
351
369
return $ this ;
352
370
}
353
371
372
+ public function setTenantName (?string $ value ): self
373
+ {
374
+ $ this ->tenantName = $ value ;
375
+
376
+ return $ this ;
377
+ }
378
+
354
379
private function requestBody (): array
355
380
{
356
381
$ payload = [];
@@ -395,6 +420,9 @@ private function requestBody(): array
395
420
if (null !== $ v = $ this ->endpointId ) {
396
421
$ payload ['EndpointId ' ] = $ v ;
397
422
}
423
+ if (null !== $ v = $ this ->tenantName ) {
424
+ $ payload ['TenantName ' ] = $ v ;
425
+ }
398
426
if (null !== $ v = $ this ->listManagementOptions ) {
399
427
$ payload ['ListManagementOptions ' ] = $ v ->requestBody ();
400
428
}
0 commit comments