ory_client/models/set_event_stream_body.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.87
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SetEventStreamBody : All fields are optional. Omitted fields keep their current value, so a caller can change only the status (pause/resume) without resubmitting the destination. API responses mask secrets; a masked value sent back is rejected, so omit the field to keep the stored value.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SetEventStreamBody {
17 /// The header that carries the API key. When omitted, the current value is kept.
18 #[serde(rename = "https_auth_header_name", skip_serializing_if = "Option::is_none")]
19 pub https_auth_header_name: Option<String>,
20 /// The API key or bearer token. When omitted, the current secret is kept as long as the scheme and the endpoint stay the same. The masked value from an API response is rejected.
21 #[serde(rename = "https_auth_secret", skip_serializing_if = "Option::is_none")]
22 pub https_auth_secret: Option<String>,
23 /// How deliveries to the HTTPS endpoint authenticate. When omitted, the current scheme and its secret are kept. `none` removes the header name and secret. Changing the scheme requires a new secret.
24 #[serde(rename = "https_auth_type", skip_serializing_if = "Option::is_none")]
25 pub https_auth_type: Option<HttpsAuthTypeEnum>,
26 /// The HTTPS endpoint URL to send events to. When omitted, the current value is kept. Changing it requires https_auth_secret in the same update when deliveries authenticate with an API key or bearer token.
27 #[serde(rename = "https_endpoint", skip_serializing_if = "Option::is_none")]
28 pub https_endpoint: Option<String>,
29 /// The AWS IAM role ARN to assume when publishing to the SNS topic. When omitted, the current value is kept.
30 #[serde(rename = "role_arn", skip_serializing_if = "Option::is_none")]
31 pub role_arn: Option<String>,
32 /// The desired status of the event stream. When omitted, the current status is kept.
33 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
34 pub status: Option<StatusEnum>,
35 /// The AWS SNS topic ARN. When omitted, the current value is kept.
36 #[serde(rename = "topic_arn", skip_serializing_if = "Option::is_none")]
37 pub topic_arn: Option<String>,
38 /// The type of the event stream (AWS SNS or HTTPS webhook). When omitted, the current type and its destination settings are kept.
39 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
40 pub r#type: Option<TypeEnum>,
41}
42
43impl SetEventStreamBody {
44 /// All fields are optional. Omitted fields keep their current value, so a caller can change only the status (pause/resume) without resubmitting the destination. API responses mask secrets; a masked value sent back is rejected, so omit the field to keep the stored value.
45 pub fn new() -> SetEventStreamBody {
46 SetEventStreamBody {
47 https_auth_header_name: None,
48 https_auth_secret: None,
49 https_auth_type: None,
50 https_endpoint: None,
51 role_arn: None,
52 status: None,
53 topic_arn: None,
54 r#type: None,
55 }
56 }
57}
58/// How deliveries to the HTTPS endpoint authenticate. When omitted, the current scheme and its secret are kept. `none` removes the header name and secret. Changing the scheme requires a new secret.
59#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
60pub enum HttpsAuthTypeEnum {
61 #[serde(rename = "none")]
62 None,
63 #[serde(rename = "api_key")]
64 ApiKey,
65 #[serde(rename = "bearer")]
66 Bearer,
67}
68
69impl Default for HttpsAuthTypeEnum {
70 fn default() -> HttpsAuthTypeEnum {
71 Self::None
72 }
73}
74/// The desired status of the event stream. When omitted, the current status is kept.
75#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
76pub enum StatusEnum {
77 #[serde(rename = "active")]
78 Active,
79 #[serde(rename = "paused")]
80 Paused,
81}
82
83impl Default for StatusEnum {
84 fn default() -> StatusEnum {
85 Self::Active
86 }
87}
88/// The type of the event stream (AWS SNS or HTTPS webhook). When omitted, the current type and its destination settings are kept.
89#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
90pub enum TypeEnum {
91 #[serde(rename = "sns")]
92 Sns,
93 #[serde(rename = "https")]
94 Https,
95}
96
97impl Default for TypeEnum {
98 fn default() -> TypeEnum {
99 Self::Sns
100 }
101}
102