# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-07-18T17:56:59+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Any as Any_aliased
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
class Entry(BaseModel):
ip: Optional[str] = Field(None, description='The IP address of the ARP table entry')
lastUpdatedAt: Optional[datetime] = Field(
None, description='Time of the last update of the ARP table entry'
)
mac: Optional[str] = Field(
None, description='The MAC address of the ARP table entry'
)
vlanId: Optional[int] = Field(
None, description='The VLAN ID of the ARP table entry'
)
class Request(BaseModel):
serial: Optional[str] = Field(None, description='Device serial number')
class Status(Enum):
complete = 'complete'
failed = 'failed'
new = 'new'
ready = 'ready'
running = 'running'
scheduled = 'scheduled'
class Message(BaseModel):
arpTableId: Optional[str] = Field(
None,
description='Id of the ARP table request. Used to check the status of the request.',
)
entries: Optional[List[Entry]] = Field(None, description='The ARP table entries')
error: Optional[str] = Field(
None, description='An error message for a failed execution'
)
request: Optional[Request] = Field(None, description='ARP table request parameters')
status: Optional[Status] = Field(
None, description='Status of the ARP table request.'
)
url: Optional[str] = Field(
None, description='GET this url to check the status of your ARP table request.'
)
class Network(BaseModel):
id: Optional[str] = None
name: Optional[str] = None
class Organization(BaseModel):
id: Optional[str] = None
name: Optional[str] = None
class BodyCallbackUrlPostRequest(BaseModel):
callbackId: Optional[str] = None
message: Optional[Message] = None
network: Optional[Network] = None
organization: Optional[Organization] = None
sentAt: Optional[str] = None
class Request3(BaseModel):
ports: Optional[List[str]] = Field(
None, description='A list of ports for which to perform the cable test.'
)
serial: Optional[str] = Field(None, description='Device serial number')
class Index(Enum):
integer_0 = 0
integer_1 = 1
integer_2 = 2
integer_3 = 3
class Status8(Enum):
abnormal = 'abnormal'
couplex = 'couplex'
fail = 'fail'
forced = 'forced'
in_progress = 'in-progress'
invalid = 'invalid'
not_supported = 'not-supported'
ok = 'ok'
open = 'open'
open_or_short = 'open or short'
short = 'short'
short_or_abnormal = 'short or abnormal'
short_or_couplex = 'short or couplex'
unknown = 'unknown'
class Pair(BaseModel):
index: Optional[Index] = Field(
None, description='The index of the twisted pair tested.'
)
lengthMeters: Optional[int] = Field(
None, description='The detected length of the twisted pair.'
)
status: Optional[Status8] = Field(
None, description='The test result of the twisted pair tested.'
)
class Status8Model(Enum):
down = 'down'
error = 'error'
in_progress = 'in-progress'
up = 'up'
class Result(BaseModel):
error: Optional[str] = Field(
None,
description='If an error occurred during the cable test, the error message will be populated here.',
)
pairs: Optional[List[Pair]] = Field(
None, description='Results for each twisted pair within the cable.'
)
port: Optional[str] = Field(
None, description='The port for which the test was performed.'
)
speedMbps: Optional[int] = Field(
None,
description='Speed in Mbps. A speed of 0 indicates the port is down or the port speed is automatic.',
)
status: Optional[Status8Model] = Field(
None,
description='The current status of the port. If the cable test is still being performed on the port, "in-progress" is used. If an error occurred during the cable test, "error" is used and the error property will be populated.',
)
class Status8Model1(Enum):
complete = 'complete'
failed = 'failed'
new = 'new'
ready = 'ready'
running = 'running'
scheduled = 'scheduled'
class MessageModel(BaseModel):
cableTestId: Optional[str] = Field(
None,
description='Id of the cable test request. Used to check the status of the request.',
)
error: Optional[str] = Field(
None, description='An error message for a failed execution'
)
request: Optional[Request3] = Field(
None, description='Cable test request parameters'
)
results: Optional[List[Result]] = Field(
None,
description='Results of the cable test request, one for each requested port.',
)
status: Optional[Status8Model1] = Field(
None, description='Status of the cable test request.'
)
url: Optional[str] = Field(
None, description='GET this url to check the status of your cable test request.'
)
class Request5(BaseModel):
duration: Optional[int] = Field(
None, description='The duration to blink leds in seconds'
)
serial: Optional[str] = Field(None, description='Device serial number')
class MessageModel1(BaseModel):
error: Optional[str] = Field(
None,
description='An error message for a failed Blink LEDs execution, if present',
)
ledsBlinkId: Optional[str] = Field(None, description='ID of led blink job')
request: Optional[Request5] = Field(
None, description='The parameters of the leds blink request'
)
status: Optional[Status8Model1] = Field(
None, description='Status of the leds blink request'
)
url: Optional[str] = Field(
None, description='GET this url to check the status of your leds blink request'
)
class Entry1(BaseModel):
mac: Optional[str] = Field(None, description='The MAC address of the MAC entry')
port: Optional[str] = Field(
None, description='The name of the interface of the MAC entry'
)
vlanId: Optional[int] = Field(None, description='The vlan id of the MAC entry')
class Request7(BaseModel):
serial: Optional[str] = Field(None, description='Device serial number')
class MessageModel2(BaseModel):
entries: Optional[List[Entry1]] = Field(
None, description='MAC address table entries'
)
error: Optional[str] = Field(
None, description='An error message for a failed execution'
)
macTableId: Optional[str] = Field(
None,
description='ID of the MAC table request. Used to check the status of the request.',
)
request: Optional[Request7] = Field(
None, description='MAC table request parameters'
)
status: Optional[Status8Model1] = Field(
None, description='Status of the MAC table request.'
)
url: Optional[str] = Field(
None, description='GET this url to check the status of your MAC table request.'
)
class Request9(BaseModel):
count: Optional[int] = Field(
None, description='Number of pings to send. [1..5], default 5'
)
serial: Optional[str] = Field(None, description='Device serial number')
target: Optional[str] = Field(None, description='IP address or FQDN to ping')
class Latencies(BaseModel):
average: Optional[float] = Field(None, description='Average latency')
maximum: Optional[float] = Field(None, description='Maximum latency')
minimum: Optional[float] = Field(None, description='Minimum latency')
class Loss(BaseModel):
percentage: Optional[float] = Field(None, description='Percentage of packets lost')
class Reply(BaseModel):
latency: Optional[float] = Field(
None, description='Latency of the packet in milliseconds'
)
sequenceId: Optional[int] = Field(None, description='Sequence ID of the packet')
size: Optional[int] = Field(None, description='Size of the packet in bytes')
class Results(BaseModel):
latencies: Optional[Latencies] = Field(None, description='Packet latency stats')
loss: Optional[Loss] = Field(None, description='Lost packets')
received: Optional[int] = Field(None, description='Number of packets received')
replies: Optional[List[Reply]] = Field(None, description='Received packets')
sent: Optional[int] = Field(None, description='Number of packets sent')
class MessageModel3(BaseModel):
pingId: Optional[str] = Field(
None, description='Id to check the status of your ping request.'
)
request: Optional[Request9] = Field(None, description='Ping request parameters')
results: Optional[Results] = Field(None, description='Results of the ping request.')
status: Optional[str] = Field(None, description='Status of the ping request.')
url: Optional[str] = Field(
None, description='GET this url to check the status of your ping request.'
)
class Request11(BaseModel):
count: Optional[int] = Field(
None, description='Number of pings to send. [1..5], default 5'
)
serial: Optional[str] = Field(None, description='Device serial number')
class Results1(BaseModel):
latencies: Optional[Latencies] = Field(None, description='Packet latency stats')
loss: Optional[Loss] = Field(None, description='Lost packets')
received: Optional[int] = Field(None, description='Number of packets received')
replies: Optional[List[Reply]] = Field(None, description='Received packets')
sent: Optional[int] = Field(None, description='Number of packets sent')
class MessageModel4(BaseModel):
pingId: Optional[str] = Field(
None, description='Id to check the status of your ping request.'
)
request: Optional[Request11] = Field(None, description='Ping request parameters')
results: Optional[Results1] = Field(
None, description='Results of the ping request.'
)
status: Optional[str] = Field(None, description='Status of the ping request.')
url: Optional[str] = Field(
None, description='GET this url to check the status of your ping request.'
)
class Request13(BaseModel):
serial: Optional[str] = Field(None, description='Device serial number')
class Speeds(BaseModel):
downstream: Optional[float] = Field(
None, description='Shows the download speed from shard (Mbps)'
)
class Result2(BaseModel):
speeds: Optional[Speeds] = Field(None, description='Shows the speeds (Mbps)')
class MessageModel5(BaseModel):
error: Optional[str] = Field(None, description='Description of the error.')
request: Optional[Request13] = Field(
None, description='The parameters of the throughput test request'
)
result: Optional[Result2] = Field(
None, description='Result of the throughput test request'
)
status: Optional[Status8Model1] = Field(
None, description='Status of the throughput test request'
)
throughputTestId: Optional[str] = Field(
None, description='ID of throughput test job'
)
url: Optional[str] = Field(
None,
description='GET this url to check the status of your throughput test request',
)
class Request15(BaseModel):
mac: Optional[str] = Field(None, description="The target's MAC address")
serial: Optional[str] = Field(None, description='Device serial number')
vlanId: Optional[int] = Field(None, description="The target's VLAN (1 to 4094)")
class MessageModel6(BaseModel):
error: Optional[str] = Field(
None, description='An error message for a failed execution'
)
request: Optional[Request15] = Field(
None, description='The parameters of the Wake-on-LAN request'
)
status: Optional[Status8Model1] = Field(
None, description='Status of the Wake-on-LAN request'
)
url: Optional[str] = Field(
None, description='GET this url to check the status of your ping request'
)
wakeOnLanId: Optional[str] = Field(None, description='ID of the Wake-on-LAN job')
class Action(BaseModel):
body: Optional[Dict[str, Any_aliased]] = Field(
None,
description='Data provided in the body of the Action. Contents depend on the Action type',
)
operation: str = Field(..., description='The operation to be used by this action')
resource: str = Field(
..., description='Unique identifier for the resource to be acted on'
)
class CreatedResource(BaseModel):
id: Optional[str] = Field(None, description='ID of the created resource')
uri: Optional[str] = Field(
None, description='URI, not including base, of the created resource'
)
class Status34(BaseModel):
completed: Optional[bool] = Field(
None,
description='Flag describing whether all actions in the action batch have completed',
)
createdResources: List[CreatedResource] = Field(
..., description='Resources created as a result of this action batch'
)
errors: Optional[List[str]] = Field(
None,
description='List of errors encountered when running actions in the action batch',
)
failed: Optional[bool] = Field(
None,
description='Flag describing whether any actions in the action batch failed',
)
class MessageModel7(BaseModel):
actions: List[Action] = Field(
...,
description="A set of changes made as part of this action (<a href='https://developer.cisco.com/meraki/api/#/rest/guides/action-batches/'>more details</a>)",
)
confirmed: Optional[bool] = Field(
None,
description='Flag describing whether the action should be previewed before executing or not',
)
id: Optional[str] = Field(
None,
description='ID of the action batch. Can be used to check the status of the action batch at /organizations/{organizationId}/actionBatches/{actionBatchId}',
)
organizationId: Optional[str] = Field(
None, description='ID of the organization this action batch belongs to'
)
status: Optional[Status34] = Field(None, description='Status of action batch')
synchronous: Optional[bool] = Field(
None,
description='Flag describing whether actions should run synchronously or asynchronously',
)
class BodyCallbackUrlPostRequestModel(BaseModel):
callbackId: Optional[str] = None
message: Optional[MessageModel7] = None
network: Optional[Network] = None
organization: Optional[Organization] = None
sentAt: Optional[str] = None