Module adcp.types.domains.error_details.requote_required

Classes

class EnvelopeField (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}
    _json_schema_extra = {
        'description': 'Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
    }

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class EnvelopeField1 (root: RootModelRootType = PydanticUndefined, **data)
Expand source code
class EnvelopeField1(AdCPRootModel[list[EnvelopeField1Item]]):
    root: Annotated[
        list[EnvelopeField1Item],
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.',
            min_length=1,
        ),
    ]

RootModel under the SDK's deferred-build policy.

class X(RootModel[A | B]) parametrizes a concrete class at the RootModel[…] expression, and that class carries pydantic's default config: its validator for the whole union is built right there, before X and any config X declares exist. For a composing root such as adagents.AdcpAgentsAuthorization that walked most of its domain into pydantic-core at import (#1694). Parametrizing this class instead inherits defer_build=True into AdCPRootModel[A | B] and into X, so the build waits for first use like every other generated model's. scripts/post_generate_fixes.defer_rootmodel_builds points every generated composing root here; a value root is a scalar subclass instead (adcp.types._scalar).

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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config
var root : list[EnvelopeField1Item]
class EnvelopeField1Item (value: Any = <object object>, *, root: Any = <object object>)
Expand source code
class EnvelopeField1Item(ScalarStr):
    __slots__ = ()
    _constraints = {'min_length': 1}

A str generated from a JSON Schema string root.

Ancestors

  • adcp.types._scalar.ScalarStr
  • adcp.types._scalar._ScalarRoot
  • builtins.str
class RequoteRequiredDetails (**data: Any)
Expand source code
class RequoteRequiredDetails(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    envelope_field: Annotated[
        EnvelopeField | EnvelopeField1 | None,
        Field(
            description='Buyer-visible request field path or paths that breached the accepted commercial envelope. Values MUST NOT name seller-internal objects or identifiers. New emitters SHOULD use the array form even for one path; the scalar form remains valid for compatibility with existing 3.x sellers.'
        ),
        NoExplicitNull,
    ] = None
    change_term_id: Annotated[
        media_buy_change_term_id.MediaBuyChangeTermId | None,
        Field(
            description='Accepted proposal change term whose typed constraint the request exceeded.'
        ),
        NoExplicitNull,
    ] = None
    decline_reason: Annotated[
        seller_policy_decline_reason.SellerPolicyDeclineReason | None,
        Field(
            description='Coarse seller-policy dimension that declined the requested shape. Sellers SHOULD populate this when they have a structured reason and disclosure does not expose private thresholds or enforcement controls. When present, it MUST be consistent with the enclosing error.recovery classification.'
        ),
        NoExplicitNull,
    ] = None

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 set additionalProperties: true override this with extra='allow' in their own model_config.

Set ADCP_STRICT_VALIDATION=1 in the environment ("1", "true", "yes", "on" are accepted) to flip the default to extra='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 adcp runs — mutating os.environ["ADCP_STRICT_VALIDATION"] after the first adcp import 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_config on 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.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var change_term_id : MediaBuyChangeTermId | None
var decline_reason : SellerPolicyDeclineReason | None
var envelope_field : EnvelopeField | EnvelopeField1 | None
var model_config

Inherited members