//! Generated by `trust-tasks-codegen` — do not edit by hand.
//!
//! Spec slug: `did-management/server/config`. Version: `0.1`.
/// Why this specification version is deprecated (SPEC "Superseded and
/// Withdrawn Versions"), or `None` while it is current.
pub const DEPRECATION: Option<&str> = None;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
/// Error types.
pub mod error {
/// Error from a `TryFrom` or `FromStr` implementation.
pub struct ConversionError(::std::borrow::Cow<'static, str>);
impl ::std::error::Error for ConversionError {}
impl ::std::fmt::Display for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Display::fmt(&self.0, f)
}
}
impl ::std::fmt::Debug for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Debug::fmt(&self.0, f)
}
}
impl From<&'static str> for ConversionError {
fn from(value: &'static str) -> Self {
Self(value.into())
}
}
impl From<String> for ConversionError {
fn from(value: String) -> Self {
Self(value.into())
}
}
}
///Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(transparent)]
pub struct Ext(pub ::std::collections::HashMap<ExtKey, ::serde_json::Value>);
impl ::std::ops::Deref for Ext {
type Target = ::std::collections::HashMap<ExtKey, ::serde_json::Value>;
fn deref(&self) -> &::std::collections::HashMap<ExtKey, ::serde_json::Value> {
&self.0
}
}
impl ::std::convert::From<Ext> for ::std::collections::HashMap<ExtKey, ::serde_json::Value> {
fn from(value: Ext) -> Self {
value.0
}
}
impl ::std::convert::From<::std::collections::HashMap<ExtKey, ::serde_json::Value>> for Ext {
fn from(value: ::std::collections::HashMap<ExtKey, ::serde_json::Value>) -> Self {
Self(value)
}
}
///`ExtKey`
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ExtKey(::std::string::String);
impl ::std::ops::Deref for ExtKey {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ExtKey> for ::std::string::String {
fn from(value: ExtKey) -> Self {
value.0
}
}
impl ::std::str::FromStr for ExtKey {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
static PATTERN: ::std::sync::LazyLock<::regress::Regex> =
::std::sync::LazyLock::new(|| {
::regress::Regex::new("^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$").unwrap()
});
if PATTERN.find(value).is_none() {
return Err("doesn't match pattern \"^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$\"".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ExtKey {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ExtKey {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ExtKey {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ExtKey {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///`Payload`
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct Payload {
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub ext: ::std::option::Option<Ext>,
}
impl ::std::default::Default for Payload {
fn default() -> Self {
Self {
ext: Default::default(),
}
}
}
impl Payload {
pub fn builder() -> builder::Payload {
Default::default()
}
}
///The hosting service's effective, non-secret configuration. Members the deployment does not configure are absent; nothing here is a secret, and a consumer MUST NOT add one under ext.
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct Response {
///`service[].type` values of the service's own resolved DID document. Absent when it could not be resolved. What the configuration enables and what the document advertises can differ; both are shown so an operator can see it.
#[serde(
rename = "advertisedServices",
default,
skip_serializing_if = "::std::vec::Vec::is_empty"
)]
pub advertised_services: ::std::vec::Vec<ResponseAdvertisedServicesItem>,
///Whether agent-name redirects (`/@name`) are served.
#[serde(rename = "agentNames")]
pub agent_names: bool,
///Implementation-defined deployment shape (e.g. a single-process daemon, or a control plane driving remote edges).
#[serde(rename = "deploymentMode")]
pub deployment_mode: ResponseDeploymentMode,
///Base URL hosted DIDs are published under. Absent when not configured.
#[serde(
rename = "didHostingUrl",
default,
skip_serializing_if = "::std::option::Option::is_none"
)]
pub did_hosting_url: ::std::option::Option<::std::string::String>,
///DID methods this build can host.
#[serde(rename = "enabledMethods")]
pub enabled_methods: ::std::vec::Vec<ResponseEnabledMethodsItem>,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub ext: ::std::option::Option<Ext>,
///The address the service's HTTP listener is bound to.
#[serde(
rename = "listenAddress",
default,
skip_serializing_if = "::std::option::Option::is_none"
)]
pub listen_address: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub logging: ::std::option::Option<ResponseLogging>,
///The messaging mediator the service is reached through. Absent when it runs without one.
#[serde(
rename = "mediatorDid",
default,
skip_serializing_if = "::std::option::Option::is_none"
)]
pub mediator_did: ::std::option::Option<::std::string::String>,
///Base URL of the service's own web surface. Absent when not configured.
#[serde(
rename = "publicUrl",
default,
skip_serializing_if = "::std::option::Option::is_none"
)]
pub public_url: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub registry: ::std::option::Option<ResponseRegistry>,
///The service's own DID — the issuer of its replies.
#[serde(rename = "serviceDid")]
pub service_did: ResponseServiceDid,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub sessions: ::std::option::Option<ResponseSessions>,
///The running implementation's version string.
#[serde(rename = "softwareVersion")]
pub software_version: ResponseSoftwareVersion,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub storage: ::std::option::Option<ResponseStorage>,
pub transports: ResponseTransports,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub vta: ::std::option::Option<ResponseVta>,
}
impl Response {
pub fn builder() -> builder::Response {
Default::default()
}
}
///`ResponseAdvertisedServicesItem`
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ResponseAdvertisedServicesItem(::std::string::String);
impl ::std::ops::Deref for ResponseAdvertisedServicesItem {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ResponseAdvertisedServicesItem> for ::std::string::String {
fn from(value: ResponseAdvertisedServicesItem) -> Self {
value.0
}
}
impl ::std::str::FromStr for ResponseAdvertisedServicesItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if value.chars().count() < 1usize {
return Err("shorter than 1 characters".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ResponseAdvertisedServicesItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ResponseAdvertisedServicesItem {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResponseAdvertisedServicesItem {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ResponseAdvertisedServicesItem {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///Implementation-defined deployment shape (e.g. a single-process daemon, or a control plane driving remote edges).
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ResponseDeploymentMode(::std::string::String);
impl ::std::ops::Deref for ResponseDeploymentMode {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ResponseDeploymentMode> for ::std::string::String {
fn from(value: ResponseDeploymentMode) -> Self {
value.0
}
}
impl ::std::str::FromStr for ResponseDeploymentMode {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if value.chars().count() < 1usize {
return Err("shorter than 1 characters".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ResponseDeploymentMode {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ResponseDeploymentMode {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResponseDeploymentMode {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ResponseDeploymentMode {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///`ResponseEnabledMethodsItem`
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ResponseEnabledMethodsItem(::std::string::String);
impl ::std::ops::Deref for ResponseEnabledMethodsItem {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ResponseEnabledMethodsItem> for ::std::string::String {
fn from(value: ResponseEnabledMethodsItem) -> Self {
value.0
}
}
impl ::std::str::FromStr for ResponseEnabledMethodsItem {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if value.chars().count() < 1usize {
return Err("shorter than 1 characters".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ResponseEnabledMethodsItem {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ResponseEnabledMethodsItem {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResponseEnabledMethodsItem {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ResponseEnabledMethodsItem {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///`ResponseLogging`
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseLogging {
pub format: ::std::string::String,
pub level: ::std::string::String,
}
impl ResponseLogging {
pub fn builder() -> builder::ResponseLogging {
Default::default()
}
}
///`ResponseRegistry`
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseRegistry {
///Instances seeded from configuration rather than registered.
#[serde(rename = "configuredInstances")]
pub configured_instances: u64,
#[serde(rename = "healthCheckIntervalSeconds")]
pub health_check_interval_seconds: ::std::num::NonZeroU64,
}
impl ResponseRegistry {
pub fn builder() -> builder::ResponseRegistry {
Default::default()
}
}
///The service's own DID — the issuer of its replies.
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ResponseServiceDid(::std::string::String);
impl ::std::ops::Deref for ResponseServiceDid {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ResponseServiceDid> for ::std::string::String {
fn from(value: ResponseServiceDid) -> Self {
value.0
}
}
impl ::std::str::FromStr for ResponseServiceDid {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if value.chars().count() < 1usize {
return Err("shorter than 1 characters".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ResponseServiceDid {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ResponseServiceDid {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResponseServiceDid {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ResponseServiceDid {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///`ResponseSessions`
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseSessions {
#[serde(rename = "accessTokenSeconds")]
pub access_token_seconds: ::std::num::NonZeroU64,
#[serde(rename = "adminIdleTimeoutSeconds")]
pub admin_idle_timeout_seconds: ::std::num::NonZeroU64,
#[serde(rename = "passkeyEnrollmentSeconds")]
pub passkey_enrollment_seconds: ::std::num::NonZeroU64,
#[serde(rename = "refreshTokenSeconds")]
pub refresh_token_seconds: ::std::num::NonZeroU64,
}
impl ResponseSessions {
pub fn builder() -> builder::ResponseSessions {
Default::default()
}
}
///The running implementation's version string.
///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[serde(transparent)]
pub struct ResponseSoftwareVersion(::std::string::String);
impl ::std::ops::Deref for ResponseSoftwareVersion {
type Target = ::std::string::String;
fn deref(&self) -> &::std::string::String {
&self.0
}
}
impl ::std::convert::From<ResponseSoftwareVersion> for ::std::string::String {
fn from(value: ResponseSoftwareVersion) -> Self {
value.0
}
}
impl ::std::str::FromStr for ResponseSoftwareVersion {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
if value.chars().count() < 1usize {
return Err("shorter than 1 characters".into());
}
Ok(Self(value.to_string()))
}
}
impl ::std::convert::TryFrom<&str> for ResponseSoftwareVersion {
type Error = self::error::ConversionError;
fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<&::std::string::String> for ResponseSoftwareVersion {
type Error = self::error::ConversionError;
fn try_from(
value: &::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl ::std::convert::TryFrom<::std::string::String> for ResponseSoftwareVersion {
type Error = self::error::ConversionError;
fn try_from(
value: ::std::string::String,
) -> ::std::result::Result<Self, self::error::ConversionError> {
value.parse()
}
}
impl<'de> ::serde::Deserialize<'de> for ResponseSoftwareVersion {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where
D: ::serde::Deserializer<'de>,
{
::std::string::String::deserialize(deserializer)?
.parse()
.map_err(|e: self::error::ConversionError| {
<D::Error as ::serde::de::Error>::custom(e.to_string())
})
}
}
///`ResponseStorage`
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseStorage {
#[serde(rename = "dataDir")]
pub data_dir: ::std::string::String,
}
impl ResponseStorage {
pub fn builder() -> builder::ResponseStorage {
Default::default()
}
}
///Which messaging transports the configuration enables.
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseTransports {
pub didcomm: bool,
pub tsp: bool,
}
impl ResponseTransports {
pub fn builder() -> builder::ResponseTransports {
Default::default()
}
}
///The verifiable trust agent holding the service's identity. Absent for a self-managed deployment.
///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
#[serde(deny_unknown_fields)]
#[non_exhaustive]
pub struct ResponseVta {
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub did: ::std::option::Option<::std::string::String>,
#[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
pub url: ::std::option::Option<::std::string::String>,
}
impl ::std::default::Default for ResponseVta {
fn default() -> Self {
Self {
did: Default::default(),
url: Default::default(),
}
}
}
impl ResponseVta {
pub fn builder() -> builder::ResponseVta {
Default::default()
}
}
/// Types for composing complex structures.
pub mod builder {
#[derive(Clone, Debug)]
pub struct Payload {
ext: ::std::result::Result<::std::option::Option<super::Ext>, ::std::string::String>,
}
impl ::std::default::Default for Payload {
fn default() -> Self {
Self {
ext: Ok(Default::default()),
}
}
}
impl Payload {
pub fn ext<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::Ext>>,
T::Error: ::std::fmt::Display,
{
self.ext = value
.try_into()
.map_err(|e| format!("error converting supplied value for ext: {e}"));
self
}
}
impl ::std::convert::TryFrom<Payload> for super::Payload {
type Error = super::error::ConversionError;
fn try_from(value: Payload) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self { ext: value.ext? })
}
}
impl ::std::convert::From<super::Payload> for Payload {
fn from(value: super::Payload) -> Self {
Self { ext: Ok(value.ext) }
}
}
#[derive(Clone, Debug)]
pub struct Response {
advertised_services: ::std::result::Result<
::std::vec::Vec<super::ResponseAdvertisedServicesItem>,
::std::string::String,
>,
agent_names: ::std::result::Result<bool, ::std::string::String>,
deployment_mode:
::std::result::Result<super::ResponseDeploymentMode, ::std::string::String>,
did_hosting_url: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
enabled_methods: ::std::result::Result<
::std::vec::Vec<super::ResponseEnabledMethodsItem>,
::std::string::String,
>,
ext: ::std::result::Result<::std::option::Option<super::Ext>, ::std::string::String>,
listen_address: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
logging: ::std::result::Result<
::std::option::Option<super::ResponseLogging>,
::std::string::String,
>,
mediator_did: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
public_url: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
registry: ::std::result::Result<
::std::option::Option<super::ResponseRegistry>,
::std::string::String,
>,
service_did: ::std::result::Result<super::ResponseServiceDid, ::std::string::String>,
sessions: ::std::result::Result<
::std::option::Option<super::ResponseSessions>,
::std::string::String,
>,
software_version:
::std::result::Result<super::ResponseSoftwareVersion, ::std::string::String>,
storage: ::std::result::Result<
::std::option::Option<super::ResponseStorage>,
::std::string::String,
>,
transports: ::std::result::Result<super::ResponseTransports, ::std::string::String>,
vta:
::std::result::Result<::std::option::Option<super::ResponseVta>, ::std::string::String>,
}
impl ::std::default::Default for Response {
fn default() -> Self {
Self {
advertised_services: Ok(Default::default()),
agent_names: Err("no value supplied for agent_names".to_string()),
deployment_mode: Err("no value supplied for deployment_mode".to_string()),
did_hosting_url: Ok(Default::default()),
enabled_methods: Err("no value supplied for enabled_methods".to_string()),
ext: Ok(Default::default()),
listen_address: Ok(Default::default()),
logging: Ok(Default::default()),
mediator_did: Ok(Default::default()),
public_url: Ok(Default::default()),
registry: Ok(Default::default()),
service_did: Err("no value supplied for service_did".to_string()),
sessions: Ok(Default::default()),
software_version: Err("no value supplied for software_version".to_string()),
storage: Ok(Default::default()),
transports: Err("no value supplied for transports".to_string()),
vta: Ok(Default::default()),
}
}
}
impl Response {
pub fn advertised_services<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::vec::Vec<super::ResponseAdvertisedServicesItem>>,
T::Error: ::std::fmt::Display,
{
self.advertised_services = value.try_into().map_err(|e| {
format!("error converting supplied value for advertised_services: {e}")
});
self
}
pub fn agent_names<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<bool>,
T::Error: ::std::fmt::Display,
{
self.agent_names = value
.try_into()
.map_err(|e| format!("error converting supplied value for agent_names: {e}"));
self
}
pub fn deployment_mode<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<super::ResponseDeploymentMode>,
T::Error: ::std::fmt::Display,
{
self.deployment_mode = value
.try_into()
.map_err(|e| format!("error converting supplied value for deployment_mode: {e}"));
self
}
pub fn did_hosting_url<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.did_hosting_url = value
.try_into()
.map_err(|e| format!("error converting supplied value for did_hosting_url: {e}"));
self
}
pub fn enabled_methods<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::vec::Vec<super::ResponseEnabledMethodsItem>>,
T::Error: ::std::fmt::Display,
{
self.enabled_methods = value
.try_into()
.map_err(|e| format!("error converting supplied value for enabled_methods: {e}"));
self
}
pub fn ext<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::Ext>>,
T::Error: ::std::fmt::Display,
{
self.ext = value
.try_into()
.map_err(|e| format!("error converting supplied value for ext: {e}"));
self
}
pub fn listen_address<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.listen_address = value
.try_into()
.map_err(|e| format!("error converting supplied value for listen_address: {e}"));
self
}
pub fn logging<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::ResponseLogging>>,
T::Error: ::std::fmt::Display,
{
self.logging = value
.try_into()
.map_err(|e| format!("error converting supplied value for logging: {e}"));
self
}
pub fn mediator_did<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.mediator_did = value
.try_into()
.map_err(|e| format!("error converting supplied value for mediator_did: {e}"));
self
}
pub fn public_url<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.public_url = value
.try_into()
.map_err(|e| format!("error converting supplied value for public_url: {e}"));
self
}
pub fn registry<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::ResponseRegistry>>,
T::Error: ::std::fmt::Display,
{
self.registry = value
.try_into()
.map_err(|e| format!("error converting supplied value for registry: {e}"));
self
}
pub fn service_did<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<super::ResponseServiceDid>,
T::Error: ::std::fmt::Display,
{
self.service_did = value
.try_into()
.map_err(|e| format!("error converting supplied value for service_did: {e}"));
self
}
pub fn sessions<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::ResponseSessions>>,
T::Error: ::std::fmt::Display,
{
self.sessions = value
.try_into()
.map_err(|e| format!("error converting supplied value for sessions: {e}"));
self
}
pub fn software_version<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<super::ResponseSoftwareVersion>,
T::Error: ::std::fmt::Display,
{
self.software_version = value
.try_into()
.map_err(|e| format!("error converting supplied value for software_version: {e}"));
self
}
pub fn storage<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::ResponseStorage>>,
T::Error: ::std::fmt::Display,
{
self.storage = value
.try_into()
.map_err(|e| format!("error converting supplied value for storage: {e}"));
self
}
pub fn transports<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<super::ResponseTransports>,
T::Error: ::std::fmt::Display,
{
self.transports = value
.try_into()
.map_err(|e| format!("error converting supplied value for transports: {e}"));
self
}
pub fn vta<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<super::ResponseVta>>,
T::Error: ::std::fmt::Display,
{
self.vta = value
.try_into()
.map_err(|e| format!("error converting supplied value for vta: {e}"));
self
}
}
impl ::std::convert::TryFrom<Response> for super::Response {
type Error = super::error::ConversionError;
fn try_from(value: Response) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
advertised_services: value.advertised_services?,
agent_names: value.agent_names?,
deployment_mode: value.deployment_mode?,
did_hosting_url: value.did_hosting_url?,
enabled_methods: value.enabled_methods?,
ext: value.ext?,
listen_address: value.listen_address?,
logging: value.logging?,
mediator_did: value.mediator_did?,
public_url: value.public_url?,
registry: value.registry?,
service_did: value.service_did?,
sessions: value.sessions?,
software_version: value.software_version?,
storage: value.storage?,
transports: value.transports?,
vta: value.vta?,
})
}
}
impl ::std::convert::From<super::Response> for Response {
fn from(value: super::Response) -> Self {
Self {
advertised_services: Ok(value.advertised_services),
agent_names: Ok(value.agent_names),
deployment_mode: Ok(value.deployment_mode),
did_hosting_url: Ok(value.did_hosting_url),
enabled_methods: Ok(value.enabled_methods),
ext: Ok(value.ext),
listen_address: Ok(value.listen_address),
logging: Ok(value.logging),
mediator_did: Ok(value.mediator_did),
public_url: Ok(value.public_url),
registry: Ok(value.registry),
service_did: Ok(value.service_did),
sessions: Ok(value.sessions),
software_version: Ok(value.software_version),
storage: Ok(value.storage),
transports: Ok(value.transports),
vta: Ok(value.vta),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseLogging {
format: ::std::result::Result<::std::string::String, ::std::string::String>,
level: ::std::result::Result<::std::string::String, ::std::string::String>,
}
impl ::std::default::Default for ResponseLogging {
fn default() -> Self {
Self {
format: Err("no value supplied for format".to_string()),
level: Err("no value supplied for level".to_string()),
}
}
}
impl ResponseLogging {
pub fn format<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::string::String>,
T::Error: ::std::fmt::Display,
{
self.format = value
.try_into()
.map_err(|e| format!("error converting supplied value for format: {e}"));
self
}
pub fn level<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::string::String>,
T::Error: ::std::fmt::Display,
{
self.level = value
.try_into()
.map_err(|e| format!("error converting supplied value for level: {e}"));
self
}
}
impl ::std::convert::TryFrom<ResponseLogging> for super::ResponseLogging {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseLogging,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
format: value.format?,
level: value.level?,
})
}
}
impl ::std::convert::From<super::ResponseLogging> for ResponseLogging {
fn from(value: super::ResponseLogging) -> Self {
Self {
format: Ok(value.format),
level: Ok(value.level),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseRegistry {
configured_instances: ::std::result::Result<u64, ::std::string::String>,
health_check_interval_seconds:
::std::result::Result<::std::num::NonZeroU64, ::std::string::String>,
}
impl ::std::default::Default for ResponseRegistry {
fn default() -> Self {
Self {
configured_instances: Err("no value supplied for configured_instances".to_string()),
health_check_interval_seconds: Err(
"no value supplied for health_check_interval_seconds".to_string(),
),
}
}
}
impl ResponseRegistry {
pub fn configured_instances<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<u64>,
T::Error: ::std::fmt::Display,
{
self.configured_instances = value.try_into().map_err(|e| {
format!("error converting supplied value for configured_instances: {e}")
});
self
}
pub fn health_check_interval_seconds<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::num::NonZeroU64>,
T::Error: ::std::fmt::Display,
{
self.health_check_interval_seconds = value.try_into().map_err(|e| {
format!("error converting supplied value for health_check_interval_seconds: {e}")
});
self
}
}
impl ::std::convert::TryFrom<ResponseRegistry> for super::ResponseRegistry {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseRegistry,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
configured_instances: value.configured_instances?,
health_check_interval_seconds: value.health_check_interval_seconds?,
})
}
}
impl ::std::convert::From<super::ResponseRegistry> for ResponseRegistry {
fn from(value: super::ResponseRegistry) -> Self {
Self {
configured_instances: Ok(value.configured_instances),
health_check_interval_seconds: Ok(value.health_check_interval_seconds),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseSessions {
access_token_seconds: ::std::result::Result<::std::num::NonZeroU64, ::std::string::String>,
admin_idle_timeout_seconds:
::std::result::Result<::std::num::NonZeroU64, ::std::string::String>,
passkey_enrollment_seconds:
::std::result::Result<::std::num::NonZeroU64, ::std::string::String>,
refresh_token_seconds: ::std::result::Result<::std::num::NonZeroU64, ::std::string::String>,
}
impl ::std::default::Default for ResponseSessions {
fn default() -> Self {
Self {
access_token_seconds: Err("no value supplied for access_token_seconds".to_string()),
admin_idle_timeout_seconds: Err(
"no value supplied for admin_idle_timeout_seconds".to_string()
),
passkey_enrollment_seconds: Err(
"no value supplied for passkey_enrollment_seconds".to_string()
),
refresh_token_seconds: Err(
"no value supplied for refresh_token_seconds".to_string()
),
}
}
}
impl ResponseSessions {
pub fn access_token_seconds<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::num::NonZeroU64>,
T::Error: ::std::fmt::Display,
{
self.access_token_seconds = value.try_into().map_err(|e| {
format!("error converting supplied value for access_token_seconds: {e}")
});
self
}
pub fn admin_idle_timeout_seconds<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::num::NonZeroU64>,
T::Error: ::std::fmt::Display,
{
self.admin_idle_timeout_seconds = value.try_into().map_err(|e| {
format!("error converting supplied value for admin_idle_timeout_seconds: {e}")
});
self
}
pub fn passkey_enrollment_seconds<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::num::NonZeroU64>,
T::Error: ::std::fmt::Display,
{
self.passkey_enrollment_seconds = value.try_into().map_err(|e| {
format!("error converting supplied value for passkey_enrollment_seconds: {e}")
});
self
}
pub fn refresh_token_seconds<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::num::NonZeroU64>,
T::Error: ::std::fmt::Display,
{
self.refresh_token_seconds = value.try_into().map_err(|e| {
format!("error converting supplied value for refresh_token_seconds: {e}")
});
self
}
}
impl ::std::convert::TryFrom<ResponseSessions> for super::ResponseSessions {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseSessions,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
access_token_seconds: value.access_token_seconds?,
admin_idle_timeout_seconds: value.admin_idle_timeout_seconds?,
passkey_enrollment_seconds: value.passkey_enrollment_seconds?,
refresh_token_seconds: value.refresh_token_seconds?,
})
}
}
impl ::std::convert::From<super::ResponseSessions> for ResponseSessions {
fn from(value: super::ResponseSessions) -> Self {
Self {
access_token_seconds: Ok(value.access_token_seconds),
admin_idle_timeout_seconds: Ok(value.admin_idle_timeout_seconds),
passkey_enrollment_seconds: Ok(value.passkey_enrollment_seconds),
refresh_token_seconds: Ok(value.refresh_token_seconds),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseStorage {
data_dir: ::std::result::Result<::std::string::String, ::std::string::String>,
}
impl ::std::default::Default for ResponseStorage {
fn default() -> Self {
Self {
data_dir: Err("no value supplied for data_dir".to_string()),
}
}
}
impl ResponseStorage {
pub fn data_dir<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::string::String>,
T::Error: ::std::fmt::Display,
{
self.data_dir = value
.try_into()
.map_err(|e| format!("error converting supplied value for data_dir: {e}"));
self
}
}
impl ::std::convert::TryFrom<ResponseStorage> for super::ResponseStorage {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseStorage,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
data_dir: value.data_dir?,
})
}
}
impl ::std::convert::From<super::ResponseStorage> for ResponseStorage {
fn from(value: super::ResponseStorage) -> Self {
Self {
data_dir: Ok(value.data_dir),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseTransports {
didcomm: ::std::result::Result<bool, ::std::string::String>,
tsp: ::std::result::Result<bool, ::std::string::String>,
}
impl ::std::default::Default for ResponseTransports {
fn default() -> Self {
Self {
didcomm: Err("no value supplied for didcomm".to_string()),
tsp: Err("no value supplied for tsp".to_string()),
}
}
}
impl ResponseTransports {
pub fn didcomm<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<bool>,
T::Error: ::std::fmt::Display,
{
self.didcomm = value
.try_into()
.map_err(|e| format!("error converting supplied value for didcomm: {e}"));
self
}
pub fn tsp<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<bool>,
T::Error: ::std::fmt::Display,
{
self.tsp = value
.try_into()
.map_err(|e| format!("error converting supplied value for tsp: {e}"));
self
}
}
impl ::std::convert::TryFrom<ResponseTransports> for super::ResponseTransports {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseTransports,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
didcomm: value.didcomm?,
tsp: value.tsp?,
})
}
}
impl ::std::convert::From<super::ResponseTransports> for ResponseTransports {
fn from(value: super::ResponseTransports) -> Self {
Self {
didcomm: Ok(value.didcomm),
tsp: Ok(value.tsp),
}
}
}
#[derive(Clone, Debug)]
pub struct ResponseVta {
did: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
url: ::std::result::Result<
::std::option::Option<::std::string::String>,
::std::string::String,
>,
}
impl ::std::default::Default for ResponseVta {
fn default() -> Self {
Self {
did: Ok(Default::default()),
url: Ok(Default::default()),
}
}
}
impl ResponseVta {
pub fn did<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.did = value
.try_into()
.map_err(|e| format!("error converting supplied value for did: {e}"));
self
}
pub fn url<T>(mut self, value: T) -> Self
where
T: ::std::convert::TryInto<::std::option::Option<::std::string::String>>,
T::Error: ::std::fmt::Display,
{
self.url = value
.try_into()
.map_err(|e| format!("error converting supplied value for url: {e}"));
self
}
}
impl ::std::convert::TryFrom<ResponseVta> for super::ResponseVta {
type Error = super::error::ConversionError;
fn try_from(
value: ResponseVta,
) -> ::std::result::Result<Self, super::error::ConversionError> {
Ok(Self {
did: value.did?,
url: value.url?,
})
}
}
impl ::std::convert::From<super::ResponseVta> for ResponseVta {
fn from(value: super::ResponseVta) -> Self {
Self {
did: Ok(value.did),
url: Ok(value.url),
}
}
}
}
impl crate::Payload for Payload {
const TYPE_URI: &'static str = "https://trusttasks.org/spec/did-management/server/config/0.1";
const IS_PROOF_REQUIRED: bool = true;
const IS_RECIPIENT_REQUIRED: bool = true;
const PAYLOAD_SCHEMA: Option<&'static str> = Some(
"{\"$defs\":{\"Ext\":{\"additionalProperties\":true,\"description\":\"Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.\",\"minProperties\":1,\"propertyNames\":{\"pattern\":\"^[a-z][a-z0-9-]*(\\\\.[a-z0-9-]+)+$\"},\"title\":\"Ext\",\"type\":\"object\"},\"Response\":{\"$anchor\":\"response\",\"additionalProperties\":false,\"description\":\"The hosting service's effective, non-secret configuration. Members the deployment does not configure are absent; nothing here is a secret, and a consumer MUST NOT add one under ext.\",\"properties\":{\"advertisedServices\":{\"description\":\"`service[].type` values of the service's own resolved DID document. Absent when it could not be resolved. What the configuration enables and what the document advertises can differ; both are shown so an operator can see it.\",\"items\":{\"minLength\":1,\"type\":\"string\"},\"type\":\"array\"},\"agentNames\":{\"description\":\"Whether agent-name redirects (`/@name`) are served.\",\"type\":\"boolean\"},\"deploymentMode\":{\"description\":\"Implementation-defined deployment shape (e.g. a single-process daemon, or a control plane driving remote edges).\",\"minLength\":1,\"type\":\"string\"},\"didHostingUrl\":{\"description\":\"Base URL hosted DIDs are published under. Absent when not configured.\",\"format\":\"uri\",\"type\":\"string\"},\"enabledMethods\":{\"description\":\"DID methods this build can host.\",\"items\":{\"minLength\":1,\"type\":\"string\"},\"type\":\"array\"},\"ext\":{\"$ref\":\"#/$defs/Ext\"},\"listenAddress\":{\"description\":\"The address the service's HTTP listener is bound to.\",\"type\":\"string\"},\"logging\":{\"additionalProperties\":false,\"properties\":{\"format\":{\"type\":\"string\"},\"level\":{\"type\":\"string\"}},\"required\":[\"level\",\"format\"],\"type\":\"object\"},\"mediatorDid\":{\"description\":\"The messaging mediator the service is reached through. Absent when it runs without one.\",\"type\":\"string\"},\"publicUrl\":{\"description\":\"Base URL of the service's own web surface. Absent when not configured.\",\"format\":\"uri\",\"type\":\"string\"},\"registry\":{\"additionalProperties\":false,\"properties\":{\"configuredInstances\":{\"description\":\"Instances seeded from configuration rather than registered.\",\"minimum\":0,\"type\":\"integer\"},\"healthCheckIntervalSeconds\":{\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"healthCheckIntervalSeconds\",\"configuredInstances\"],\"type\":\"object\"},\"serviceDid\":{\"description\":\"The service's own DID — the issuer of its replies.\",\"minLength\":1,\"type\":\"string\"},\"sessions\":{\"additionalProperties\":false,\"properties\":{\"accessTokenSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"adminIdleTimeoutSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"passkeyEnrollmentSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"refreshTokenSeconds\":{\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"accessTokenSeconds\",\"refreshTokenSeconds\",\"adminIdleTimeoutSeconds\",\"passkeyEnrollmentSeconds\"],\"type\":\"object\"},\"softwareVersion\":{\"description\":\"The running implementation's version string.\",\"minLength\":1,\"type\":\"string\"},\"storage\":{\"additionalProperties\":false,\"properties\":{\"dataDir\":{\"type\":\"string\"}},\"required\":[\"dataDir\"],\"type\":\"object\"},\"transports\":{\"additionalProperties\":false,\"description\":\"Which messaging transports the configuration enables.\",\"properties\":{\"didcomm\":{\"type\":\"boolean\"},\"tsp\":{\"type\":\"boolean\"}},\"required\":[\"tsp\",\"didcomm\"],\"type\":\"object\"},\"vta\":{\"additionalProperties\":false,\"description\":\"The verifiable trust agent holding the service's identity. Absent for a self-managed deployment.\",\"properties\":{\"did\":{\"type\":\"string\"},\"url\":{\"format\":\"uri\",\"type\":\"string\"}},\"type\":\"object\"}},\"required\":[\"serviceDid\",\"softwareVersion\",\"deploymentMode\",\"transports\",\"enabledMethods\",\"agentNames\"],\"title\":\"Server Config — response payload\",\"type\":\"object\"}},\"$id\":\"https://trusttasks.org/spec/did-management/server/config/0.1\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\",\"additionalProperties\":false,\"properties\":{\"ext\":{\"$ref\":\"#/$defs/Ext\"}},\"title\":\"Server Config — payload\",\"type\":\"object\"}\n",
);
}
impl crate::Payload for Response {
const TYPE_URI: &'static str =
"https://trusttasks.org/spec/did-management/server/config/0.1#response";
const IS_PROOF_REQUIRED: bool = true;
const IS_RECIPIENT_REQUIRED: bool = true;
const PAYLOAD_SCHEMA: Option<&'static str> = Some(
"{\"$defs\":{\"Ext\":{\"additionalProperties\":true,\"description\":\"Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.\",\"minProperties\":1,\"propertyNames\":{\"pattern\":\"^[a-z][a-z0-9-]*(\\\\.[a-z0-9-]+)+$\"},\"title\":\"Ext\",\"type\":\"object\"},\"Response\":{\"$anchor\":\"response\",\"additionalProperties\":false,\"description\":\"The hosting service's effective, non-secret configuration. Members the deployment does not configure are absent; nothing here is a secret, and a consumer MUST NOT add one under ext.\",\"properties\":{\"advertisedServices\":{\"description\":\"`service[].type` values of the service's own resolved DID document. Absent when it could not be resolved. What the configuration enables and what the document advertises can differ; both are shown so an operator can see it.\",\"items\":{\"minLength\":1,\"type\":\"string\"},\"type\":\"array\"},\"agentNames\":{\"description\":\"Whether agent-name redirects (`/@name`) are served.\",\"type\":\"boolean\"},\"deploymentMode\":{\"description\":\"Implementation-defined deployment shape (e.g. a single-process daemon, or a control plane driving remote edges).\",\"minLength\":1,\"type\":\"string\"},\"didHostingUrl\":{\"description\":\"Base URL hosted DIDs are published under. Absent when not configured.\",\"format\":\"uri\",\"type\":\"string\"},\"enabledMethods\":{\"description\":\"DID methods this build can host.\",\"items\":{\"minLength\":1,\"type\":\"string\"},\"type\":\"array\"},\"ext\":{\"$ref\":\"#/$defs/Ext\"},\"listenAddress\":{\"description\":\"The address the service's HTTP listener is bound to.\",\"type\":\"string\"},\"logging\":{\"additionalProperties\":false,\"properties\":{\"format\":{\"type\":\"string\"},\"level\":{\"type\":\"string\"}},\"required\":[\"level\",\"format\"],\"type\":\"object\"},\"mediatorDid\":{\"description\":\"The messaging mediator the service is reached through. Absent when it runs without one.\",\"type\":\"string\"},\"publicUrl\":{\"description\":\"Base URL of the service's own web surface. Absent when not configured.\",\"format\":\"uri\",\"type\":\"string\"},\"registry\":{\"additionalProperties\":false,\"properties\":{\"configuredInstances\":{\"description\":\"Instances seeded from configuration rather than registered.\",\"minimum\":0,\"type\":\"integer\"},\"healthCheckIntervalSeconds\":{\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"healthCheckIntervalSeconds\",\"configuredInstances\"],\"type\":\"object\"},\"serviceDid\":{\"description\":\"The service's own DID — the issuer of its replies.\",\"minLength\":1,\"type\":\"string\"},\"sessions\":{\"additionalProperties\":false,\"properties\":{\"accessTokenSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"adminIdleTimeoutSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"passkeyEnrollmentSeconds\":{\"minimum\":1,\"type\":\"integer\"},\"refreshTokenSeconds\":{\"minimum\":1,\"type\":\"integer\"}},\"required\":[\"accessTokenSeconds\",\"refreshTokenSeconds\",\"adminIdleTimeoutSeconds\",\"passkeyEnrollmentSeconds\"],\"type\":\"object\"},\"softwareVersion\":{\"description\":\"The running implementation's version string.\",\"minLength\":1,\"type\":\"string\"},\"storage\":{\"additionalProperties\":false,\"properties\":{\"dataDir\":{\"type\":\"string\"}},\"required\":[\"dataDir\"],\"type\":\"object\"},\"transports\":{\"additionalProperties\":false,\"description\":\"Which messaging transports the configuration enables.\",\"properties\":{\"didcomm\":{\"type\":\"boolean\"},\"tsp\":{\"type\":\"boolean\"}},\"required\":[\"tsp\",\"didcomm\"],\"type\":\"object\"},\"vta\":{\"additionalProperties\":false,\"description\":\"The verifiable trust agent holding the service's identity. Absent for a self-managed deployment.\",\"properties\":{\"did\":{\"type\":\"string\"},\"url\":{\"format\":\"uri\",\"type\":\"string\"}},\"type\":\"object\"}},\"required\":[\"serviceDid\",\"softwareVersion\",\"deploymentMode\",\"transports\",\"enabledMethods\",\"agentNames\"],\"title\":\"Server Config — response payload\",\"type\":\"object\"}},\"$ref\":\"#/$defs/Response\",\"$schema\":\"https://json-schema.org/draft/2020-12/schema\"}\n",
);
}
impl crate::RequestPayload for Payload {
type Response = Response;
}
/// The earlier `MAJOR.MINOR` of this slug that this version declares it
/// extends (front matter `extends`, SPEC §5.2 "Declared extension"), or
/// `None`. Only the direct declaration; walk a chain with
/// [`crate::extension::extends_for`].
pub const EXTENDS: Option<&str> = None;
/// The extended error codes this specification declares (SPEC §7.3 item 9,
/// §8.5), in declaration order. Empty when it declares none.
pub const ERROR_CODES: &[crate::DeclaredErrorCode] = &[];