1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Tapis PgREST API
*
* The Tapis PgREST API provides a RESTful interface to a managed SQL-db-as-a-service.
*
* The version of the OpenAPI document: 1.0.0
* Contact: cicsupport@tacc.utexas.edu
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NewView {
/// The name of the view to create.
#[serde(rename = "view_name")]
pub view_name: String,
/// Query to run on 'from_table' to create a view from.
#[serde(rename = "select_query", skip_serializing_if = "Option::is_none")]
pub select_query: Option<String>,
/// Table to run select query on and create view from.
#[serde(rename = "from_table", skip_serializing_if = "Option::is_none")]
pub from_table: Option<String>,
/// Text area to describe view. Returned when calling manage endpoints.
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
pub comments: Option<String>,
/// Roles users who access this view must have in security kernel to have permission to see this view.
#[serde(rename = "permission_rules", skip_serializing_if = "Option::is_none")]
pub permission_rules: Option<Vec<String>>,
/// Admin only. Full support of SQL when creating complex views.
#[serde(rename = "raw_sql", skip_serializing_if = "Option::is_none")]
pub raw_sql: Option<String>,
/// Admin only. Full support of SQL when creating complex materialized views.
#[serde(
rename = "materialized_view_raw_sql",
skip_serializing_if = "Option::is_none"
)]
pub materialized_view_raw_sql: Option<String>,
}
impl NewView {
pub fn new(view_name: String) -> NewView {
NewView {
view_name,
select_query: None,
from_table: None,
comments: None,
permission_rules: None,
raw_sql: None,
materialized_view_raw_sql: None,
}
}
}