encode<V> static method
V
encode<
V>( - AppsSecret instance,
- Encoder<V> encoder
)
Implementation
static V encode<V>(
AppsSecret instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeDateTime(
'created',
instance.created,
);
if (instance.deleted != null) {
container.encodeBool(
'deleted',
instance.deleted!,
);
}
if (instance.expiresAt != null) {
container.encodeDateTime(
'expires_at',
instance.expiresAt!,
);
}
container.encodeString(
'id',
instance.id,
);
container.encodeBool(
'livemode',
instance.livemode,
);
container.encodeString(
'name',
instance.name,
);
container.encodeString(
'object',
'apps.secret',
);
if (instance.payload != null) {
container.encodeString(
'payload',
instance.payload!,
);
}
SecretServiceResourceScope.encode(
instance.scope,
container.nestedSingleValueContainer('scope').encoder,
);
return container.value;
}