-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
use crate::schema::IntegerEnumValue; | ||
use crate::schema::NumberEnumValue; | ||
use crate::schema::{PulumiMap, StringEnumValue}; | ||
use pulumi_wasm_provider_common; | ||
Check warning Code scanning / clippy this import is redundant Warning
this import is redundant
|
||
use serde::Deserialize; | ||
use std::collections::BTreeSet; | ||
|
||
pulumi_wasm_provider_common::generate_string_const!(StringConstant, "string"); | ||
pulumi_wasm_provider_common::generate_string_const!(IntegerConstant, "integer"); | ||
pulumi_wasm_provider_common::generate_string_const!(NumberConstant, "number"); | ||
pulumi_wasm_provider_common::generate_string_const!(BooleanConstant, "boolean"); | ||
pulumi_wasm_provider_common::generate_string_const!(ArrayConstant, "array"); | ||
pulumi_wasm_provider_common::generate_string_const!(ObjectConstant, "object"); | ||
|
||
#[derive(Deserialize)] | ||
pub(crate) struct PulumiSchema { | ||
Check warning Code scanning / clippy field types is never read Warning
field types is never read
|
||
#[serde(default)] | ||
types: PulumiMap<TopLevelType>, | ||
Check warning Code scanning / clippy field types is never read Warning
field types is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
#[serde(untagged)] | ||
enum TopLevelType { | ||
Object(MyTypeObject), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
StringEnum(StringEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
IntegerEnum(IntegerEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
NumberEnum(NumberEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
#[serde(untagged)] | ||
enum InnerType { | ||
StringEnum(StringEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
IntegerEnum(IntegerEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
NumberEnum(NumberEnumType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
Boolean(BooleanType), | ||
AnyString(AnyStringType), | ||
AnyNumber(AnyNumberType), | ||
AnyInteger(AnyIntegerType), | ||
HashMap(HashMapType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
Ref(RefType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
OneOf(OneOfType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
Array(ArrayType), | ||
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
Check warning Code scanning / clippy field 0 is never read Warning
field 0 is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct MyTypeObject { | ||
Check warning Code scanning / clippy fields type_, description, properties, and required are never read Warning
fields type\_, description, properties, and required are never read
|
||
#[serde(rename = "type")] | ||
type_: ObjectConstant, | ||
Check warning Code scanning / clippy fields type_, description, properties, and required are never read Warning
fields type\_, description, properties, and required are never read
|
||
description: Option<String>, | ||
Check warning Code scanning / clippy fields type_, description, properties, and required are never read Warning
fields type\_, description, properties, and required are never read
|
||
properties: PulumiMap<InnerType>, | ||
Check warning Code scanning / clippy fields type_, description, properties, and required are never read Warning
fields type\_, description, properties, and required are never read
|
||
#[serde(default)] | ||
required: BTreeSet<String>, | ||
Check warning Code scanning / clippy fields type_, description, properties, and required are never read Warning
fields type\_, description, properties, and required are never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct StringEnumType { | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "type")] | ||
type_: StringConstant, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "enum")] | ||
enum_: Vec<StringEnumValue>, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct IntegerEnumType { | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "type")] | ||
type_: IntegerConstant, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "enum")] | ||
enum_: Vec<IntegerEnumValue>, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct NumberEnumType { | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "type")] | ||
type_: NumberConstant, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
#[serde(rename = "enum")] | ||
enum_: Vec<NumberEnumValue>, | ||
Check warning Code scanning / clippy fields type_ and enum_ are never read Warning
fields type\_ and enum\_ are never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct AnyStringType { | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
#[serde(rename = "type")] | ||
type_: StringConstant, | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct BooleanType { | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
#[serde(rename = "type")] | ||
type_: BooleanConstant, | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct AnyIntegerType { | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
#[serde(rename = "type")] | ||
type_: IntegerConstant, | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct AnyNumberType { | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
#[serde(rename = "type")] | ||
type_: NumberConstant, | ||
Check warning Code scanning / clippy field type_ is never read Warning
field type\_ is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct RefType { | ||
Check warning Code scanning / clippy field ref_ is never read Warning
field ref\_ is never read
|
||
#[serde(rename = "$ref")] | ||
ref_: String, | ||
Check warning Code scanning / clippy field ref_ is never read Warning
field ref\_ is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct OneOfType { | ||
Check warning Code scanning / clippy field one_of is never read Warning
field one\_of is never read
|
||
#[serde(rename = "oneOf")] | ||
one_of: Vec<InnerType>, | ||
Check warning Code scanning / clippy field one_of is never read Warning
field one\_of is never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct ArrayType { | ||
Check warning Code scanning / clippy fields type_ and items are never read Warning
fields type\_ and items are never read
|
||
#[serde(rename = "type")] | ||
type_: ArrayConstant, | ||
Check warning Code scanning / clippy fields type_ and items are never read Warning
fields type\_ and items are never read
|
||
items: Box<InnerType>, | ||
Check warning Code scanning / clippy fields type_ and items are never read Warning
fields type\_ and items are never read
|
||
} | ||
|
||
#[derive(Deserialize)] | ||
struct HashMapType { | ||
Check warning Code scanning / clippy fields type_ and additional_properties are never read Warning
fields type\_ and additional\_properties are never read
|
||
#[serde(rename = "type")] | ||
type_: ObjectConstant, | ||
Check warning Code scanning / clippy fields type_ and additional_properties are never read Warning
fields type\_ and additional\_properties are never read
|
||
#[serde(rename = "additionalProperties")] | ||
additional_properties: Box<InnerType>, | ||
Check warning Code scanning / clippy fields type_ and additional_properties are never read Warning
fields type\_ and additional\_properties are never read
|
||
} |