ory_client/models/
ui_node_script_attributes.rs

1/*
2 * Ory APIs
3 *
4 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.  ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages:  | Language       | Download SDK                                                     | Documentation                                                                        | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart           | [pub.dev](https://pub.dev/packages/ory_client)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md)       | | .NET           | [nuget.org](https://www.nuget.org/packages/Ory.Client/)          | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md)     | | Elixir         | [hex.pm](https://hex.pm/packages/ory_client)                     | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md)     | | Go             | [github.com](https://github.com/ory/client-go)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md)         | | Java           | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md)       | | JavaScript     | [npmjs.com](https://www.npmjs.com/package/@ory/client)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) |  | PHP            | [packagist.org](https://packagist.org/packages/ory/client)       | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md)        | | Python         | [pypi.org](https://pypi.org/project/ory-client/)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md)     | | Ruby           | [rubygems.org](https://rubygems.org/gems/ory-client)             | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md)       | | Rust           | [crates.io](https://crates.io/crates/ory-client)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md)       | 
5 *
6 * The version of the OpenAPI document: v1.22.7
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UiNodeScriptAttributes {
16    /// The script async type
17    #[serde(rename = "async")]
18    pub r#async: bool,
19    /// The script cross origin policy
20    #[serde(rename = "crossorigin")]
21    pub crossorigin: String,
22    /// A unique identifier
23    #[serde(rename = "id")]
24    pub id: String,
25    /// The script's integrity hash
26    #[serde(rename = "integrity")]
27    pub integrity: String,
28    /// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". text Text input Input img Image a Anchor script Script div Division
29    #[serde(rename = "node_type")]
30    pub node_type: NodeTypeEnum,
31    /// Nonce for CSP  A nonce you may want to use to improve your Content Security Policy. You do not have to use this value but if you want to improve your CSP policies you may use it. You can also choose to use your own nonce value!
32    #[serde(rename = "nonce")]
33    pub nonce: String,
34    /// The script referrer policy
35    #[serde(rename = "referrerpolicy")]
36    pub referrerpolicy: String,
37    /// The script source
38    #[serde(rename = "src")]
39    pub src: String,
40    /// The script MIME type
41    #[serde(rename = "type")]
42    pub r#type: String,
43}
44
45impl UiNodeScriptAttributes {
46    pub fn new(r#async: bool, crossorigin: String, id: String, integrity: String, node_type: NodeTypeEnum, nonce: String, referrerpolicy: String, src: String, r#type: String) -> UiNodeScriptAttributes {
47        UiNodeScriptAttributes {
48            r#async,
49            crossorigin,
50            id,
51            integrity,
52            node_type,
53            nonce,
54            referrerpolicy,
55            src,
56            r#type,
57        }
58    }
59}
60/// NodeType represents this node's types. It is a mirror of `node.type` and is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is \"script\". text Text input Input img Image a Anchor script Script div Division
61#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
62pub enum NodeTypeEnum {
63    #[serde(rename = "script")]
64    Script,
65}
66
67impl Default for NodeTypeEnum {
68    fn default() -> NodeTypeEnum {
69        Self::Script
70    }
71}
72