netboxgo/circuits.go

106 lines
3.1 KiB
Go

package netboxgo
import (
"time"
)
type Circuits struct {
Count int `json:"count"`
Next string `json:"next"`
Previous string `json:"previous"`
Results []struct {
ID int `json:"id"`
Cid string `json:"cid"`
Provider struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
CircuitCount int `json:"circuit_count"`
} `json:"provider"`
Type struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
CircuitCount int `json:"circuit_count"`
} `json:"type"`
Status struct {
Label string `json:"label"`
Value string `json:"value"`
} `json:"status"`
Tenant struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"tenant"`
InstallDate string `json:"install_date"`
CommitRate int `json:"commit_rate"`
Description string `json:"description"`
TerminationA struct {
ID int `json:"id"`
URL string `json:"url"`
Site struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"site"`
ConnectedEndpoint struct {
ID int `json:"id"`
URL string `json:"url"`
Device struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"device"`
Name string `json:"name"`
Cable int `json:"cable"`
ConnectionStatus struct {
Label string `json:"label"`
Value bool `json:"value"`
} `json:"connection_status"`
} `json:"connected_endpoint"`
PortSpeed int `json:"port_speed"`
UpstreamSpeed int `json:"upstream_speed"`
XconnectID string `json:"xconnect_id"`
} `json:"termination_a"`
TerminationZ struct {
ID int `json:"id"`
URL string `json:"url"`
Site struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"site"`
ConnectedEndpoint struct {
ID int `json:"id"`
URL string `json:"url"`
Device struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"device"`
Name string `json:"name"`
Cable int `json:"cable"`
ConnectionStatus struct {
Label string `json:"label"`
Value bool `json:"value"`
} `json:"connection_status"`
} `json:"connected_endpoint"`
PortSpeed int `json:"port_speed"`
UpstreamSpeed int `json:"upstream_speed"`
XconnectID string `json:"xconnect_id"`
} `json:"termination_z"`
Comments string `json:"comments"`
Tags []string `json:"tags"`
CustomFields interface{} `json:"custom_fields"`
Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"`
} `json:"results"`
}