Module adcp.types.domains.account.sync_governance_response
Classes
class Account (**data: Any)-
Expand source code
class Account(AdCPBaseModel): model_config = ConfigDict( extra='allow', ) account: Annotated[ account_ref.AccountReference, Field(description='Account reference, echoed from request') ] status: Annotated[ Status, Field( description='Sync result. synced: governance agents persisted. failed: could not complete (see errors).' ), ] governance_agents: Annotated[ list[GovernanceAgent] | None, Field( description='Governance agent now synced on this account. Reflects the persisted state after sync. Exactly one entry; the array shape mirrors the request schema and the one-agent-per-account invariant. See sync_governance request schema.', max_length=1, min_length=1, ), ] = None errors: Annotated[ list[error.Error] | None, Field( description="Per-account errors (only present when status is 'failed')", min_length=1 ), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var account : AccountReference1 | AccountReference2var errors : list[Error] | Nonevar governance_agents : list[GovernanceAgent] | Nonevar model_configvar status : Status
Inherited members
class GovernanceAgent (**data: Any)-
Expand source code
class GovernanceAgent(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) url: Annotated[AnyUrl, Field(description='Governance agent endpoint URL.')]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var model_configvar url : pydantic.networks.AnyUrl
Inherited members
class Status (*args, **kwds)-
Expand source code
class Status(StrEnum): synced = 'synced' failed = 'failed'Enum where members are also (and must be) strings
Ancestors
- enum.StrEnum
- builtins.str
- enum.ReprEnum
- enum.Enum
Class variables
var failedvar synced
class SyncGovernanceResponse (**data: Any)-
Expand source code
class SyncGovernanceResponse(AdcpResponse, ResponseArmDispatchMixin, AdcpVersionEnvelope, ProtocolEnvelope): """Constructible compatibility base for generated response arms.""" @classmethod def _response_arm_models(cls) -> tuple[type[SyncGovernanceResponse], ...]: return ( SyncGovernanceResponse1, SyncGovernanceResponse2, )Constructible compatibility base for generated response arms.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdcpResponse
- adcp.types.base._AdcpMessage
- ResponseArmDispatchMixin
- AdcpVersionEnvelope
- ProtocolEnvelope
- AdCPBaseModel
- pydantic.main.BaseModel
Subclasses
Class variables
var model_config
Inherited members
class SyncGovernanceResponse1 (**data: Any)-
Expand source code
class SyncGovernanceResponse1(SyncGovernanceResponse): model_config = ConfigDict( extra='allow', ) accounts: Annotated[list[Account], Field(description='Per-account sync results')] context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneConstructible compatibility base for generated response arms.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- SyncGovernanceResponse
- AdcpResponse
- adcp.types.base._AdcpMessage
- ResponseArmDispatchMixin
- AdcpVersionEnvelope
- ProtocolEnvelope
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var accounts : list[Account]var context : ContextObject | Nonevar ext : ExtensionObject | Nonevar model_config
Inherited members
class SyncGovernanceResponse2 (**data: Any)-
Expand source code
class SyncGovernanceResponse2(SyncGovernanceResponse): model_config = ConfigDict( extra='allow', ) errors: Annotated[ list[error.Error], Field( description='Operation-level errors (e.g., authentication failure, service unavailable)', min_length=1, ), ] context: context_1.ContextObject | None = None ext: ext_1.ExtensionObject | None = NoneConstructible compatibility base for generated response arms.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- SyncGovernanceResponse
- AdcpResponse
- adcp.types.base._AdcpMessage
- ResponseArmDispatchMixin
- AdcpVersionEnvelope
- ProtocolEnvelope
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var context : ContextObject | Nonevar errors : list[Error]var ext : ExtensionObject | Nonevar model_config
Inherited members