influxdb2/models/ast/
import_declaration.rs

1//! ImportDeclaration
2
3use serde::{Deserialize, Serialize};
4
5/// Declares a package import
6#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
7pub struct ImportDeclaration {
8    /// Type of AST node
9    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
10    pub r#type: Option<String>,
11    /// Import Identifier
12    #[serde(rename = "as", skip_serializing_if = "Option::is_none")]
13    pub r#as: Option<crate::models::ast::Identifier>,
14    /// Import Path
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub path: Option<crate::models::ast::StringLiteral>,
17}
18
19impl ImportDeclaration {
20    /// Declares a package import
21    pub fn new() -> Self {
22        Self::default()
23    }
24}