models.py•1.79 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:19:24+00:00
from __future__ import annotations
from enum import Enum
from typing import Optional
from pydantic import BaseModel, Field
class Type(Enum):
URL_NOTIFICATION_TYPE_UNSPECIFIED = 'URL_NOTIFICATION_TYPE_UNSPECIFIED'
URL_UPDATED = 'URL_UPDATED'
URL_DELETED = 'URL_DELETED'
class UrlNotification(BaseModel):
notifyTime: Optional[str] = Field(
None,
description='Creation timestamp for this notification. Users should _not_ specify it, the field is ignored at the request time.',
)
type: Optional[Type] = Field(
None,
description='The URL life cycle event that Google is being notified about.',
)
url: Optional[str] = Field(
None,
description='The object of this notification. The URL must be owned by the publisher of this notification and, in case of `URL_UPDATED` notifications, it _must_ be crawlable by Google.',
)
class UrlNotificationMetadata(BaseModel):
latestRemove: Optional[UrlNotification] = Field(
None, description='Latest notification received with type `URL_REMOVED`.'
)
latestUpdate: Optional[UrlNotification] = Field(
None, description='Latest notification received with type `URL_UPDATED`.'
)
url: Optional[str] = Field(None, description='URL to which this metadata refers.')
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'
class PublishUrlNotificationResponse(BaseModel):
urlNotificationMetadata: Optional[UrlNotificationMetadata] = Field(
None,
description='Description of the notification events received for this URL.',
)