Struct kafka_protocol::messages::create_delegation_token_response::CreateDelegationTokenResponse
source · #[non_exhaustive]pub struct CreateDelegationTokenResponse {
pub error_code: i16,
pub principal_type: StrBytes,
pub principal_name: StrBytes,
pub token_requester_principal_type: StrBytes,
pub token_requester_principal_name: StrBytes,
pub issue_timestamp_ms: i64,
pub expiry_timestamp_ms: i64,
pub max_timestamp_ms: i64,
pub token_id: StrBytes,
pub hmac: Bytes,
pub throttle_time_ms: i32,
pub unknown_tagged_fields: BTreeMap<i32, Bytes>,
}Expand description
Valid versions: 0-3
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error_code: i16The top-level error, or zero if there was no error.
Supported API versions: 0-3
principal_type: StrBytesThe principal type of the token owner.
Supported API versions: 0-3
principal_name: StrBytesThe name of the token owner.
Supported API versions: 0-3
token_requester_principal_type: StrBytesThe principal type of the requester of the token.
Supported API versions: 3
token_requester_principal_name: StrBytesThe principal type of the requester of the token.
Supported API versions: 3
issue_timestamp_ms: i64When this token was generated.
Supported API versions: 0-3
expiry_timestamp_ms: i64When this token expires.
Supported API versions: 0-3
max_timestamp_ms: i64The maximum lifetime of this token.
Supported API versions: 0-3
token_id: StrBytesThe token UUID.
Supported API versions: 0-3
hmac: BytesHMAC of the delegation token.
Supported API versions: 0-3
throttle_time_ms: i32The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
Supported API versions: 0-3
unknown_tagged_fields: BTreeMap<i32, Bytes>Other tagged fields
Implementations§
source§impl CreateDelegationTokenResponse
impl CreateDelegationTokenResponse
sourcepub fn with_error_code(self, value: i16) -> Self
pub fn with_error_code(self, value: i16) -> Self
Sets error_code to the passed value.
The top-level error, or zero if there was no error.
Supported API versions: 0-3
sourcepub fn with_principal_type(self, value: StrBytes) -> Self
pub fn with_principal_type(self, value: StrBytes) -> Self
Sets principal_type to the passed value.
The principal type of the token owner.
Supported API versions: 0-3
sourcepub fn with_principal_name(self, value: StrBytes) -> Self
pub fn with_principal_name(self, value: StrBytes) -> Self
Sets principal_name to the passed value.
The name of the token owner.
Supported API versions: 0-3
sourcepub fn with_token_requester_principal_type(self, value: StrBytes) -> Self
pub fn with_token_requester_principal_type(self, value: StrBytes) -> Self
Sets token_requester_principal_type to the passed value.
The principal type of the requester of the token.
Supported API versions: 3
sourcepub fn with_token_requester_principal_name(self, value: StrBytes) -> Self
pub fn with_token_requester_principal_name(self, value: StrBytes) -> Self
Sets token_requester_principal_name to the passed value.
The principal type of the requester of the token.
Supported API versions: 3
sourcepub fn with_issue_timestamp_ms(self, value: i64) -> Self
pub fn with_issue_timestamp_ms(self, value: i64) -> Self
Sets issue_timestamp_ms to the passed value.
When this token was generated.
Supported API versions: 0-3
sourcepub fn with_expiry_timestamp_ms(self, value: i64) -> Self
pub fn with_expiry_timestamp_ms(self, value: i64) -> Self
Sets expiry_timestamp_ms to the passed value.
When this token expires.
Supported API versions: 0-3
sourcepub fn with_max_timestamp_ms(self, value: i64) -> Self
pub fn with_max_timestamp_ms(self, value: i64) -> Self
Sets max_timestamp_ms to the passed value.
The maximum lifetime of this token.
Supported API versions: 0-3
sourcepub fn with_token_id(self, value: StrBytes) -> Self
pub fn with_token_id(self, value: StrBytes) -> Self
Sets token_id to the passed value.
The token UUID.
Supported API versions: 0-3
sourcepub fn with_hmac(self, value: Bytes) -> Self
pub fn with_hmac(self, value: Bytes) -> Self
Sets hmac to the passed value.
HMAC of the delegation token.
Supported API versions: 0-3
sourcepub fn with_throttle_time_ms(self, value: i32) -> Self
pub fn with_throttle_time_ms(self, value: i32) -> Self
Sets throttle_time_ms to the passed value.
The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
Supported API versions: 0-3
sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
source§impl Clone for CreateDelegationTokenResponse
impl Clone for CreateDelegationTokenResponse
source§fn clone(&self) -> CreateDelegationTokenResponse
fn clone(&self) -> CreateDelegationTokenResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl From<CreateDelegationTokenResponse> for ResponseKind
impl From<CreateDelegationTokenResponse> for ResponseKind
source§fn from(value: CreateDelegationTokenResponse) -> ResponseKind
fn from(value: CreateDelegationTokenResponse) -> ResponseKind
source§impl HeaderVersion for CreateDelegationTokenResponse
impl HeaderVersion for CreateDelegationTokenResponse
source§fn header_version(version: i16) -> i16
fn header_version(version: i16) -> i16
source§impl Message for CreateDelegationTokenResponse
impl Message for CreateDelegationTokenResponse
source§const VERSIONS: VersionRange = _
const VERSIONS: VersionRange = _
source§const DEPRECATED_VERSIONS: Option<VersionRange> = None
const DEPRECATED_VERSIONS: Option<VersionRange> = None
source§impl PartialEq for CreateDelegationTokenResponse
impl PartialEq for CreateDelegationTokenResponse
source§fn eq(&self, other: &CreateDelegationTokenResponse) -> bool
fn eq(&self, other: &CreateDelegationTokenResponse) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateDelegationTokenResponse
Auto Trait Implementations§
impl !Freeze for CreateDelegationTokenResponse
impl RefUnwindSafe for CreateDelegationTokenResponse
impl Send for CreateDelegationTokenResponse
impl Sync for CreateDelegationTokenResponse
impl Unpin for CreateDelegationTokenResponse
impl UnwindSafe for CreateDelegationTokenResponse
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)