A bearer token supplied by the SDK client for a BYOK provider. The runtime sets it as `Authorization: Bearer ` on the outbound request and does no caching; the SDK consumer owns token caching and refresh.
| 5381 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 5382 | @dataclass |
| 5383 | class ProviderTokenAcquireResult: |
| 5384 | """A bearer token supplied by the SDK client for a BYOK provider. The runtime sets it as |
| 5385 | `Authorization: Bearer <token>` on the outbound request and does no caching; the SDK |
| 5386 | consumer owns token caching and refresh. |
| 5387 | """ |
| 5388 | token: str |
| 5389 | """The bearer token value (without the `Bearer ` prefix).""" |
| 5390 | |
| 5391 | @staticmethod |
| 5392 | def from_dict(obj: Any) -> 'ProviderTokenAcquireResult': |
| 5393 | assert isinstance(obj, dict) |
| 5394 | token = from_str(obj.get("token")) |
| 5395 | return ProviderTokenAcquireResult(token) |
| 5396 | |
| 5397 | def to_dict(self) -> dict: |
| 5398 | result: dict = {} |
| 5399 | result["token"] = from_str(self.token) |
| 5400 | return result |
| 5401 | |
| 5402 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 5403 | @dataclass |