This commit is contained in:
Adam Leventhal 2022-03-07 23:22:44 -08:00 committed by GitHub
parent 39177c5c0c
commit 305635e779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 29 deletions

6
Cargo.lock generated
View File

@ -1763,7 +1763,7 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]] [[package]]
name = "typify" name = "typify"
version = "0.0.6-dev" version = "0.0.6-dev"
source = "git+https://github.com/oxidecomputer/typify#9afa917671b29fc231bc9ce304e041bdd685af09" source = "git+https://github.com/oxidecomputer/typify#8316b7d227eeec59d854279e947b1882ae2c635a"
dependencies = [ dependencies = [
"typify-impl", "typify-impl",
"typify-macro", "typify-macro",
@ -1772,7 +1772,7 @@ dependencies = [
[[package]] [[package]]
name = "typify-impl" name = "typify-impl"
version = "0.0.6-dev" version = "0.0.6-dev"
source = "git+https://github.com/oxidecomputer/typify#9afa917671b29fc231bc9ce304e041bdd685af09" source = "git+https://github.com/oxidecomputer/typify#8316b7d227eeec59d854279e947b1882ae2c635a"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"log", "log",
@ -1789,7 +1789,7 @@ dependencies = [
[[package]] [[package]]
name = "typify-macro" name = "typify-macro"
version = "0.0.6-dev" version = "0.0.6-dev"
source = "git+https://github.com/oxidecomputer/typify#9afa917671b29fc231bc9ce304e041bdd685af09" source = "git+https://github.com/oxidecomputer/typify#8316b7d227eeec59d854279e947b1882ae2c635a"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@ -12,7 +12,7 @@ pub mod types {
} }
#[doc = "The type of an individual datum of a metric."] #[doc = "The type of an individual datum of a metric."]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum DatumType { pub enum DatumType {
Bool, Bool,
I64, I64,
@ -27,7 +27,7 @@ pub mod types {
impl ToString for DatumType { impl ToString for DatumType {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
DatumType::Bool => "Bool".to_string(), DatumType::Bool => "Bool".to_string(),
DatumType::I64 => "I64".to_string(), DatumType::I64 => "I64".to_string(),
DatumType::F64 => "F64".to_string(), DatumType::F64 => "F64".to_string(),
@ -125,7 +125,7 @@ pub mod types {
} }
#[doc = "The source from which a field is derived, the target or metric."] #[doc = "The source from which a field is derived, the target or metric."]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum FieldSource { pub enum FieldSource {
Target, Target,
Metric, Metric,
@ -133,7 +133,7 @@ pub mod types {
impl ToString for FieldSource { impl ToString for FieldSource {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
FieldSource::Target => "Target".to_string(), FieldSource::Target => "Target".to_string(),
FieldSource::Metric => "Metric".to_string(), FieldSource::Metric => "Metric".to_string(),
} }
@ -141,7 +141,7 @@ pub mod types {
} }
#[doc = "The `FieldType` identifies the data type of a target or metric field."] #[doc = "The `FieldType` identifies the data type of a target or metric field."]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum FieldType { pub enum FieldType {
String, String,
I64, I64,
@ -152,7 +152,7 @@ pub mod types {
impl ToString for FieldType { impl ToString for FieldType {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
FieldType::String => "String".to_string(), FieldType::String => "String".to_string(),
FieldType::I64 => "I64".to_string(), FieldType::I64 => "I64".to_string(),
FieldType::IpAddr => "IpAddr".to_string(), FieldType::IpAddr => "IpAddr".to_string(),
@ -163,7 +163,7 @@ pub mod types {
} }
#[doc = "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order."] #[doc = "Supported set of sort modes for scanning by id only.\n\nCurrently, we only support scanning in ascending order."]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum IdSortMode { pub enum IdSortMode {
#[serde(rename = "id-ascending")] #[serde(rename = "id-ascending")]
IdAscending, IdAscending,
@ -171,7 +171,7 @@ pub mod types {
impl ToString for IdSortMode { impl ToString for IdSortMode {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
IdSortMode::IdAscending => "id-ascending".to_string(), IdSortMode::IdAscending => "id-ascending".to_string(),
} }
} }
@ -236,7 +236,7 @@ pub mod types {
} }
#[doc = "Running state of an Instance (primarily: booted or stopped)\n\nThis typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle"] #[doc = "Running state of an Instance (primarily: booted or stopped)\n\nThis typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle"]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum InstanceState { pub enum InstanceState {
#[serde(rename = "creating")] #[serde(rename = "creating")]
Creating, Creating,
@ -262,7 +262,7 @@ pub mod types {
impl ToString for InstanceState { impl ToString for InstanceState {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
InstanceState::Creating => "creating".to_string(), InstanceState::Creating => "creating".to_string(),
InstanceState::Starting => "starting".to_string(), InstanceState::Starting => "starting".to_string(),
InstanceState::Running => "running".to_string(), InstanceState::Running => "running".to_string(),
@ -333,7 +333,7 @@ pub mod types {
} }
#[doc = "Supported set of sort modes for scanning by name or id"] #[doc = "Supported set of sort modes for scanning by name or id"]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum NameOrIdSortMode { pub enum NameOrIdSortMode {
#[serde(rename = "name-ascending")] #[serde(rename = "name-ascending")]
NameAscending, NameAscending,
@ -345,7 +345,7 @@ pub mod types {
impl ToString for NameOrIdSortMode { impl ToString for NameOrIdSortMode {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
NameOrIdSortMode::NameAscending => "name-ascending".to_string(), NameOrIdSortMode::NameAscending => "name-ascending".to_string(),
NameOrIdSortMode::NameDescending => "name-descending".to_string(), NameOrIdSortMode::NameDescending => "name-descending".to_string(),
NameOrIdSortMode::IdAscending => "id-ascending".to_string(), NameOrIdSortMode::IdAscending => "id-ascending".to_string(),
@ -354,7 +354,7 @@ pub mod types {
} }
#[doc = "Supported set of sort modes for scanning by name only\n\nCurrently, we only support scanning in ascending order."] #[doc = "Supported set of sort modes for scanning by name only\n\nCurrently, we only support scanning in ascending order."]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum NameSortMode { pub enum NameSortMode {
#[serde(rename = "name-ascending")] #[serde(rename = "name-ascending")]
NameAscending, NameAscending,
@ -362,7 +362,7 @@ pub mod types {
impl ToString for NameSortMode { impl ToString for NameSortMode {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
NameSortMode::NameAscending => "name-ascending".to_string(), NameSortMode::NameAscending => "name-ascending".to_string(),
} }
} }
@ -588,7 +588,7 @@ pub mod types {
} }
#[doc = "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context"] #[doc = "The classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.\n\nSee [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context"]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum RouterRouteKind { pub enum RouterRouteKind {
#[serde(rename = "default")] #[serde(rename = "default")]
Default, Default,
@ -602,7 +602,7 @@ pub mod types {
impl ToString for RouterRouteKind { impl ToString for RouterRouteKind {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
RouterRouteKind::Default => "default".to_string(), RouterRouteKind::Default => "default".to_string(),
RouterRouteKind::VpcSubnet => "vpc_subnet".to_string(), RouterRouteKind::VpcSubnet => "vpc_subnet".to_string(),
RouterRouteKind::VpcPeering => "vpc_peering".to_string(), RouterRouteKind::VpcPeering => "vpc_peering".to_string(),
@ -810,7 +810,7 @@ pub mod types {
pub time_modified: chrono::DateTime<chrono::offset::Utc>, pub time_modified: chrono::DateTime<chrono::offset::Utc>,
} }
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum VpcFirewallRuleAction { pub enum VpcFirewallRuleAction {
#[serde(rename = "allow")] #[serde(rename = "allow")]
Allow, Allow,
@ -820,14 +820,14 @@ pub mod types {
impl ToString for VpcFirewallRuleAction { impl ToString for VpcFirewallRuleAction {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
VpcFirewallRuleAction::Allow => "allow".to_string(), VpcFirewallRuleAction::Allow => "allow".to_string(),
VpcFirewallRuleAction::Deny => "deny".to_string(), VpcFirewallRuleAction::Deny => "deny".to_string(),
} }
} }
} }
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum VpcFirewallRuleDirection { pub enum VpcFirewallRuleDirection {
#[serde(rename = "inbound")] #[serde(rename = "inbound")]
Inbound, Inbound,
@ -837,7 +837,7 @@ pub mod types {
impl ToString for VpcFirewallRuleDirection { impl ToString for VpcFirewallRuleDirection {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
VpcFirewallRuleDirection::Inbound => "inbound".to_string(), VpcFirewallRuleDirection::Inbound => "inbound".to_string(),
VpcFirewallRuleDirection::Outbound => "outbound".to_string(), VpcFirewallRuleDirection::Outbound => "outbound".to_string(),
} }
@ -874,7 +874,7 @@ pub mod types {
} }
#[doc = "The protocols that may be specified in a firewall rule's filter"] #[doc = "The protocols that may be specified in a firewall rule's filter"]
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum VpcFirewallRuleProtocol { pub enum VpcFirewallRuleProtocol {
#[serde(rename = "TCP")] #[serde(rename = "TCP")]
Tcp, Tcp,
@ -886,7 +886,7 @@ pub mod types {
impl ToString for VpcFirewallRuleProtocol { impl ToString for VpcFirewallRuleProtocol {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
VpcFirewallRuleProtocol::Tcp => "TCP".to_string(), VpcFirewallRuleProtocol::Tcp => "TCP".to_string(),
VpcFirewallRuleProtocol::Udp => "UDP".to_string(), VpcFirewallRuleProtocol::Udp => "UDP".to_string(),
VpcFirewallRuleProtocol::Icmp => "ICMP".to_string(), VpcFirewallRuleProtocol::Icmp => "ICMP".to_string(),
@ -904,7 +904,7 @@ pub mod types {
pub next_page: Option<String>, pub next_page: Option<String>,
} }
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum VpcFirewallRuleStatus { pub enum VpcFirewallRuleStatus {
#[serde(rename = "disabled")] #[serde(rename = "disabled")]
Disabled, Disabled,
@ -914,7 +914,7 @@ pub mod types {
impl ToString for VpcFirewallRuleStatus { impl ToString for VpcFirewallRuleStatus {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
VpcFirewallRuleStatus::Disabled => "disabled".to_string(), VpcFirewallRuleStatus::Disabled => "disabled".to_string(),
VpcFirewallRuleStatus::Enabled => "enabled".to_string(), VpcFirewallRuleStatus::Enabled => "enabled".to_string(),
} }
@ -1001,7 +1001,7 @@ pub mod types {
pub name: Name, pub name: Name,
} }
#[derive(Serialize, Deserialize, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Hash)]
pub enum VpcRouterKind { pub enum VpcRouterKind {
#[serde(rename = "system")] #[serde(rename = "system")]
System, System,
@ -1011,7 +1011,7 @@ pub mod types {
impl ToString for VpcRouterKind { impl ToString for VpcRouterKind {
fn to_string(&self) -> String { fn to_string(&self) -> String {
match self { match *self {
VpcRouterKind::System => "system".to_string(), VpcRouterKind::System => "system".to_string(),
VpcRouterKind::Custom => "custom".to_string(), VpcRouterKind::Custom => "custom".to_string(),
} }