33namespace AsyncAws \BedrockRuntime \Input ;
44
55use AsyncAws \BedrockRuntime \Enum \PerformanceConfigLatency ;
6+ use AsyncAws \BedrockRuntime \Enum \ServiceTierType ;
67use AsyncAws \BedrockRuntime \Enum \Trace ;
78use AsyncAws \Core \Exception \InvalidArgument ;
89use AsyncAws \Core \Input ;
@@ -103,6 +104,13 @@ final class InvokeModelRequest extends Input
103104 */
104105 private $ performanceConfigLatency ;
105106
107+ /**
108+ * Specifies the processing tier type used for serving the request.
109+ *
110+ * @var ServiceTierType::*|null
111+ */
112+ private $ serviceTier ;
113+
106114 /**
107115 * @param array{
108116 * body?: string|null,
@@ -113,6 +121,7 @@ final class InvokeModelRequest extends Input
113121 * guardrailIdentifier?: string|null,
114122 * guardrailVersion?: string|null,
115123 * performanceConfigLatency?: PerformanceConfigLatency::*|null,
124+ * serviceTier?: ServiceTierType::*|null,
116125 * '@region'?: string|null,
117126 * } $input
118127 */
@@ -126,6 +135,7 @@ public function __construct(array $input = [])
126135 $ this ->guardrailIdentifier = $ input ['guardrailIdentifier ' ] ?? null ;
127136 $ this ->guardrailVersion = $ input ['guardrailVersion ' ] ?? null ;
128137 $ this ->performanceConfigLatency = $ input ['performanceConfigLatency ' ] ?? null ;
138+ $ this ->serviceTier = $ input ['serviceTier ' ] ?? null ;
129139 parent ::__construct ($ input );
130140 }
131141
@@ -139,6 +149,7 @@ public function __construct(array $input = [])
139149 * guardrailIdentifier?: string|null,
140150 * guardrailVersion?: string|null,
141151 * performanceConfigLatency?: PerformanceConfigLatency::*|null,
152+ * serviceTier?: ServiceTierType::*|null,
142153 * '@region'?: string|null,
143154 * }|InvokeModelRequest $input
144155 */
@@ -185,6 +196,14 @@ public function getPerformanceConfigLatency(): ?string
185196 return $ this ->performanceConfigLatency ;
186197 }
187198
199+ /**
200+ * @return ServiceTierType::*|null
201+ */
202+ public function getServiceTier (): ?string
203+ {
204+ return $ this ->serviceTier ;
205+ }
206+
188207 /**
189208 * @return Trace::*|null
190209 */
@@ -227,6 +246,12 @@ public function request(): Request
227246 }
228247 $ headers ['X-Amzn-Bedrock-PerformanceConfig-Latency ' ] = $ this ->performanceConfigLatency ;
229248 }
249+ if (null !== $ this ->serviceTier ) {
250+ if (!ServiceTierType::exists ($ this ->serviceTier )) {
251+ throw new InvalidArgument (\sprintf ('Invalid parameter "serviceTier" for "%s". The value "%s" is not a valid "ServiceTierType". ' , __CLASS__ , $ this ->serviceTier ));
252+ }
253+ $ headers ['X-Amzn-Bedrock-Service-Tier ' ] = $ this ->serviceTier ;
254+ }
230255
231256 // Prepare query
232257 $ query = [];
@@ -298,6 +323,16 @@ public function setPerformanceConfigLatency(?string $value): self
298323 return $ this ;
299324 }
300325
326+ /**
327+ * @param ServiceTierType::*|null $value
328+ */
329+ public function setServiceTier (?string $ value ): self
330+ {
331+ $ this ->serviceTier = $ value ;
332+
333+ return $ this ;
334+ }
335+
301336 /**
302337 * @param Trace::*|null $value
303338 */
0 commit comments