Skip to main content

hook0_client/generated/
models.rs

1// Generated by hook0-sdkgen from the OpenAPI snapshot the API crate commits.
2// Do not edit by hand: run `UPDATE_SDK=rust cargo test -p hook0-sdkgen sdk_targets` and commit the result.
3//! The types the API carries, one declaration per schema and per enumeration it names.
4
5use chrono::DateTime;
6use chrono::NaiveDate;
7use chrono::Utc;
8use serde_json::Value;
9use std::collections::HashMap;
10use url::Url;
11use uuid::Uuid;
12
13/// One of the values the API answers with.
14#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
15pub enum ApplicationInfoOnboardingStepsEvent {
16    /// The `ToDo` the API answers with.
17    #[serde(rename = "ToDo")]
18    ToDo,
19    /// The `Done` the API answers with.
20    #[serde(rename = "Done")]
21    Done,
22}
23
24impl ApplicationInfoOnboardingStepsEvent {
25    /// The text this value travels as.
26    pub const fn as_str(&self) -> &'static str {
27        match self {
28            Self::ToDo => "ToDo",
29            Self::Done => "Done",
30        }
31    }
32}
33
34impl std::fmt::Display for ApplicationInfoOnboardingStepsEvent {
35    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
36        formatter.write_str(self.as_str())
37    }
38}
39
40/// One of the values the API answers with.
41#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
42pub enum ApplicationInfoOnboardingStepsEventType {
43    /// The `ToDo` the API answers with.
44    #[serde(rename = "ToDo")]
45    ToDo,
46    /// The `Done` the API answers with.
47    #[serde(rename = "Done")]
48    Done,
49}
50
51impl ApplicationInfoOnboardingStepsEventType {
52    /// The text this value travels as.
53    pub const fn as_str(&self) -> &'static str {
54        match self {
55            Self::ToDo => "ToDo",
56            Self::Done => "Done",
57        }
58    }
59}
60
61impl std::fmt::Display for ApplicationInfoOnboardingStepsEventType {
62    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63        formatter.write_str(self.as_str())
64    }
65}
66
67/// One of the values the API answers with.
68#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
69pub enum ApplicationInfoOnboardingStepsSubscription {
70    /// The `ToDo` the API answers with.
71    #[serde(rename = "ToDo")]
72    ToDo,
73    /// The `Done` the API answers with.
74    #[serde(rename = "Done")]
75    Done,
76}
77
78impl ApplicationInfoOnboardingStepsSubscription {
79    /// The text this value travels as.
80    pub const fn as_str(&self) -> &'static str {
81        match self {
82            Self::ToDo => "ToDo",
83            Self::Done => "Done",
84        }
85    }
86}
87
88impl std::fmt::Display for ApplicationInfoOnboardingStepsSubscription {
89    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
90        formatter.write_str(self.as_str())
91    }
92}
93
94/// One of the values the API answers with.
95#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
96pub enum OrganizationInfoOnboardingStepsApplication {
97    /// The `ToDo` the API answers with.
98    #[serde(rename = "ToDo")]
99    ToDo,
100    /// The `Done` the API answers with.
101    #[serde(rename = "Done")]
102    Done,
103}
104
105impl OrganizationInfoOnboardingStepsApplication {
106    /// The text this value travels as.
107    pub const fn as_str(&self) -> &'static str {
108        match self {
109            Self::ToDo => "ToDo",
110            Self::Done => "Done",
111        }
112    }
113}
114
115impl std::fmt::Display for OrganizationInfoOnboardingStepsApplication {
116    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
117        formatter.write_str(self.as_str())
118    }
119}
120
121/// One of the values the API answers with.
122#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
123pub enum OrganizationInfoOnboardingStepsEvent {
124    /// The `ToDo` the API answers with.
125    #[serde(rename = "ToDo")]
126    ToDo,
127    /// The `Done` the API answers with.
128    #[serde(rename = "Done")]
129    Done,
130}
131
132impl OrganizationInfoOnboardingStepsEvent {
133    /// The text this value travels as.
134    pub const fn as_str(&self) -> &'static str {
135        match self {
136            Self::ToDo => "ToDo",
137            Self::Done => "Done",
138        }
139    }
140}
141
142impl std::fmt::Display for OrganizationInfoOnboardingStepsEvent {
143    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
144        formatter.write_str(self.as_str())
145    }
146}
147
148/// One of the values the API answers with.
149#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
150pub enum OrganizationInfoOnboardingStepsEventType {
151    /// The `ToDo` the API answers with.
152    #[serde(rename = "ToDo")]
153    ToDo,
154    /// The `Done` the API answers with.
155    #[serde(rename = "Done")]
156    Done,
157}
158
159impl OrganizationInfoOnboardingStepsEventType {
160    /// The text this value travels as.
161    pub const fn as_str(&self) -> &'static str {
162        match self {
163            Self::ToDo => "ToDo",
164            Self::Done => "Done",
165        }
166    }
167}
168
169impl std::fmt::Display for OrganizationInfoOnboardingStepsEventType {
170    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
171        formatter.write_str(self.as_str())
172    }
173}
174
175/// One of the values the API answers with.
176#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
177pub enum OrganizationInfoOnboardingStepsSubscription {
178    /// The `ToDo` the API answers with.
179    #[serde(rename = "ToDo")]
180    ToDo,
181    /// The `Done` the API answers with.
182    #[serde(rename = "Done")]
183    Done,
184}
185
186impl OrganizationInfoOnboardingStepsSubscription {
187    /// The text this value travels as.
188    pub const fn as_str(&self) -> &'static str {
189        match self {
190            Self::ToDo => "ToDo",
191            Self::Done => "Done",
192        }
193    }
194}
195
196impl std::fmt::Display for OrganizationInfoOnboardingStepsSubscription {
197    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
198        formatter.write_str(self.as_str())
199    }
200}
201
202/// One of the values the API answers with.
203#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
204pub enum ProblemId {
205    /// The `OrganizationNameMissing` the API answers with.
206    #[serde(rename = "OrganizationNameMissing")]
207    OrganizationNameMissing,
208    /// The `UserAlreadyExist` the API answers with.
209    #[serde(rename = "UserAlreadyExist")]
210    UserAlreadyExist,
211    /// The `RegistrationDisabled` the API answers with.
212    #[serde(rename = "RegistrationDisabled")]
213    RegistrationDisabled,
214    /// The `PasswordTooShort` the API answers with.
215    #[serde(rename = "PasswordTooShort")]
216    PasswordTooShort,
217    /// The `PasswordTooLong` the API answers with.
218    #[serde(rename = "PasswordTooLong")]
219    PasswordTooLong,
220    /// The `PasswordSimilarToEmail` the API answers with.
221    #[serde(rename = "PasswordSimilarToEmail")]
222    PasswordSimilarToEmail,
223    /// The `PasswordSimilarToName` the API answers with.
224    #[serde(rename = "PasswordSimilarToName")]
225    PasswordSimilarToName,
226    /// The `PasswordTooCommon` the API answers with.
227    #[serde(rename = "PasswordTooCommon")]
228    PasswordTooCommon,
229    /// The `PasswordNotDiverseEnough` the API answers with.
230    #[serde(rename = "PasswordNotDiverseEnough")]
231    PasswordNotDiverseEnough,
232    /// The `OrganizationIsNotEmpty` the API answers with.
233    #[serde(rename = "OrganizationIsNotEmpty")]
234    OrganizationIsNotEmpty,
235    /// The `InvitedUserDoesNotExist` the API answers with.
236    #[serde(rename = "InvitedUserDoesNotExist")]
237    InvitedUserDoesNotExist,
238    /// The `InvitedUserAlreadyInOrganization` the API answers with.
239    #[serde(rename = "InvitedUserAlreadyInOrganization")]
240    InvitedUserAlreadyInOrganization,
241    /// The `ApplicationNameMissing` the API answers with.
242    #[serde(rename = "ApplicationNameMissing")]
243    ApplicationNameMissing,
244    /// The `InvalidRole` the API answers with.
245    #[serde(rename = "InvalidRole")]
246    InvalidRole,
247    /// The `EventTypeAlreadyExist` the API answers with.
248    #[serde(rename = "EventTypeAlreadyExist")]
249    EventTypeAlreadyExist,
250    /// The `EventTypeDoesNotExist` the API answers with.
251    #[serde(rename = "EventTypeDoesNotExist")]
252    EventTypeDoesNotExist,
253    /// The `UnauthorizedWorkers` the API answers with.
254    #[serde(rename = "UnauthorizedWorkers")]
255    UnauthorizedWorkers,
256    /// The `EventAlreadyIngested` the API answers with.
257    #[serde(rename = "EventAlreadyIngested")]
258    EventAlreadyIngested,
259    /// The `EventInvalidPayloadContentType` the API answers with.
260    #[serde(rename = "EventInvalidPayloadContentType")]
261    EventInvalidPayloadContentType,
262    /// The `EventInvalidBase64Payload` the API answers with.
263    #[serde(rename = "EventInvalidBase64Payload")]
264    EventInvalidBase64Payload,
265    /// The `EventInvalidJsonPayload` the API answers with.
266    #[serde(rename = "EventInvalidJsonPayload")]
267    EventInvalidJsonPayload,
268    /// The `LabelsAmbiguity` the API answers with.
269    #[serde(rename = "LabelsAmbiguity")]
270    LabelsAmbiguity,
271    /// The `InvalidDateRange` the API answers with.
272    #[serde(rename = "InvalidDateRange")]
273    InvalidDateRange,
274    /// The `AuthNoAuthorizationHeader` the API answers with.
275    #[serde(rename = "AuthNoAuthorizationHeader")]
276    AuthNoAuthorizationHeader,
277    /// The `AuthInvalidAuthorizationHeader` the API answers with.
278    #[serde(rename = "AuthInvalidAuthorizationHeader")]
279    AuthInvalidAuthorizationHeader,
280    /// The `AuthApplicationSecretLookupError` the API answers with.
281    #[serde(rename = "AuthApplicationSecretLookupError")]
282    AuthApplicationSecretLookupError,
283    /// The `AuthInvalidApplicationSecret` the API answers with.
284    #[serde(rename = "AuthInvalidApplicationSecret")]
285    AuthInvalidApplicationSecret,
286    /// The `AuthBiscuitLookupError` the API answers with.
287    #[serde(rename = "AuthBiscuitLookupError")]
288    AuthBiscuitLookupError,
289    /// The `AuthInvalidBiscuit` the API answers with.
290    #[serde(rename = "AuthInvalidBiscuit")]
291    AuthInvalidBiscuit,
292    /// The `AuthFailedLogin` the API answers with.
293    #[serde(rename = "AuthFailedLogin")]
294    AuthFailedLogin,
295    /// The `AuthEmailNotVerified` the API answers with.
296    #[serde(rename = "AuthEmailNotVerified")]
297    AuthEmailNotVerified,
298    /// The `AuthEmailAlreadyVerified` the API answers with.
299    #[serde(rename = "AuthEmailAlreadyVerified")]
300    AuthEmailAlreadyVerified,
301    /// The `AuthFailedRefresh` the API answers with.
302    #[serde(rename = "AuthFailedRefresh")]
303    AuthFailedRefresh,
304    /// The `AuthEmailExpired` the API answers with.
305    #[serde(rename = "AuthEmailExpired")]
306    AuthEmailExpired,
307    /// The `TooManyMembersPerOrganization` the API answers with.
308    #[serde(rename = "TooManyMembersPerOrganization")]
309    TooManyMembersPerOrganization,
310    /// The `TooManyApplicationsPerOrganization` the API answers with.
311    #[serde(rename = "TooManyApplicationsPerOrganization")]
312    TooManyApplicationsPerOrganization,
313    /// The `TooManyEventsToday` the API answers with.
314    #[serde(rename = "TooManyEventsToday")]
315    TooManyEventsToday,
316    /// The `TooManySubscriptionsPerApplication` the API answers with.
317    #[serde(rename = "TooManySubscriptionsPerApplication")]
318    TooManySubscriptionsPerApplication,
319    /// The `TooManyEventTypesPerApplication` the API answers with.
320    #[serde(rename = "TooManyEventTypesPerApplication")]
321    TooManyEventTypesPerApplication,
322    /// The `JsonPayload` the API answers with.
323    #[serde(rename = "JsonPayload")]
324    JsonPayload,
325    /// The `Validation` the API answers with.
326    #[serde(rename = "Validation")]
327    Validation,
328    /// The `NotFound` the API answers with.
329    #[serde(rename = "NotFound")]
330    NotFound,
331    /// The `InternalServerError` the API answers with.
332    #[serde(rename = "InternalServerError")]
333    InternalServerError,
334    /// The `Forbidden` the API answers with.
335    #[serde(rename = "Forbidden")]
336    Forbidden,
337    /// The `RateLimited` the API answers with.
338    #[serde(rename = "RateLimited")]
339    RateLimited,
340    /// The `ServiceUnavailable` the API answers with.
341    #[serde(rename = "ServiceUnavailable")]
342    ServiceUnavailable,
343}
344
345impl ProblemId {
346    /// The text this value travels as.
347    pub const fn as_str(&self) -> &'static str {
348        match self {
349            Self::OrganizationNameMissing => "OrganizationNameMissing",
350            Self::UserAlreadyExist => "UserAlreadyExist",
351            Self::RegistrationDisabled => "RegistrationDisabled",
352            Self::PasswordTooShort => "PasswordTooShort",
353            Self::PasswordTooLong => "PasswordTooLong",
354            Self::PasswordSimilarToEmail => "PasswordSimilarToEmail",
355            Self::PasswordSimilarToName => "PasswordSimilarToName",
356            Self::PasswordTooCommon => "PasswordTooCommon",
357            Self::PasswordNotDiverseEnough => "PasswordNotDiverseEnough",
358            Self::OrganizationIsNotEmpty => "OrganizationIsNotEmpty",
359            Self::InvitedUserDoesNotExist => "InvitedUserDoesNotExist",
360            Self::InvitedUserAlreadyInOrganization => "InvitedUserAlreadyInOrganization",
361            Self::ApplicationNameMissing => "ApplicationNameMissing",
362            Self::InvalidRole => "InvalidRole",
363            Self::EventTypeAlreadyExist => "EventTypeAlreadyExist",
364            Self::EventTypeDoesNotExist => "EventTypeDoesNotExist",
365            Self::UnauthorizedWorkers => "UnauthorizedWorkers",
366            Self::EventAlreadyIngested => "EventAlreadyIngested",
367            Self::EventInvalidPayloadContentType => "EventInvalidPayloadContentType",
368            Self::EventInvalidBase64Payload => "EventInvalidBase64Payload",
369            Self::EventInvalidJsonPayload => "EventInvalidJsonPayload",
370            Self::LabelsAmbiguity => "LabelsAmbiguity",
371            Self::InvalidDateRange => "InvalidDateRange",
372            Self::AuthNoAuthorizationHeader => "AuthNoAuthorizationHeader",
373            Self::AuthInvalidAuthorizationHeader => "AuthInvalidAuthorizationHeader",
374            Self::AuthApplicationSecretLookupError => "AuthApplicationSecretLookupError",
375            Self::AuthInvalidApplicationSecret => "AuthInvalidApplicationSecret",
376            Self::AuthBiscuitLookupError => "AuthBiscuitLookupError",
377            Self::AuthInvalidBiscuit => "AuthInvalidBiscuit",
378            Self::AuthFailedLogin => "AuthFailedLogin",
379            Self::AuthEmailNotVerified => "AuthEmailNotVerified",
380            Self::AuthEmailAlreadyVerified => "AuthEmailAlreadyVerified",
381            Self::AuthFailedRefresh => "AuthFailedRefresh",
382            Self::AuthEmailExpired => "AuthEmailExpired",
383            Self::TooManyMembersPerOrganization => "TooManyMembersPerOrganization",
384            Self::TooManyApplicationsPerOrganization => "TooManyApplicationsPerOrganization",
385            Self::TooManyEventsToday => "TooManyEventsToday",
386            Self::TooManySubscriptionsPerApplication => "TooManySubscriptionsPerApplication",
387            Self::TooManyEventTypesPerApplication => "TooManyEventTypesPerApplication",
388            Self::JsonPayload => "JsonPayload",
389            Self::Validation => "Validation",
390            Self::NotFound => "NotFound",
391            Self::InternalServerError => "InternalServerError",
392            Self::Forbidden => "Forbidden",
393            Self::RateLimited => "RateLimited",
394            Self::ServiceUnavailable => "ServiceUnavailable",
395        }
396    }
397}
398
399impl std::fmt::Display for ProblemId {
400    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
401        formatter.write_str(self.as_str())
402    }
403}
404
405/// One of the values the API answers with.
406#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
407pub enum RequestAttemptStatusType {
408    /// The `waiting` the API answers with.
409    #[serde(rename = "waiting")]
410    Waiting,
411    /// The `pending` the API answers with.
412    #[serde(rename = "pending")]
413    Pending,
414    /// The `in_progress` the API answers with.
415    #[serde(rename = "in_progress")]
416    InProgress,
417    /// The `successful` the API answers with.
418    #[serde(rename = "successful")]
419    Successful,
420    /// The `failed` the API answers with.
421    #[serde(rename = "failed")]
422    Failed,
423}
424
425impl RequestAttemptStatusType {
426    /// The text this value travels as.
427    pub const fn as_str(&self) -> &'static str {
428        match self {
429            Self::Waiting => "waiting",
430            Self::Pending => "pending",
431            Self::InProgress => "in_progress",
432            Self::Successful => "successful",
433            Self::Failed => "failed",
434        }
435    }
436}
437
438impl std::fmt::Display for RequestAttemptStatusType {
439    fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
440        formatter.write_str(self.as_str())
441    }
442}
443
444/// The `Application` the API declares.
445#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
446pub struct Application {
447    /// `application_id`: Unique identifier of the application.
448    #[serde(rename = "application_id")]
449    pub application_id: Uuid,
450    /// `name`: Name of the application. Length: 2-50 characters.
451    #[serde(rename = "name")]
452    pub name: String,
453    /// `organization_id`: UUID of the organization this application belongs to.
454    #[serde(rename = "organization_id")]
455    pub organization_id: Uuid,
456}
457
458/// The `ApplicationInfo` the API declares.
459#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
460pub struct ApplicationInfo {
461    /// `application_id`: Unique identifier of the application.
462    #[serde(rename = "application_id")]
463    pub application_id: Uuid,
464    /// `consumption`: Current consumption metrics for this application.
465    #[serde(rename = "consumption")]
466    pub consumption: ApplicationInfoConsumption,
467    /// `name`: Name of the application. Length: 2-50 characters.
468    #[serde(rename = "name")]
469    pub name: String,
470    /// `onboarding_steps`: Onboarding completion status for this application.
471    #[serde(rename = "onboarding_steps")]
472    pub onboarding_steps: ApplicationInfoOnboardingSteps,
473    /// `organization_id`: UUID of the organization this application belongs to.
474    #[serde(rename = "organization_id")]
475    pub organization_id: Uuid,
476    /// `quotas`: Quota limits for this application.
477    #[serde(rename = "quotas")]
478    pub quotas: ApplicationInfoQuotas,
479}
480
481/// The `ApplicationInfoConsumption` the API declares.
482#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
483pub struct ApplicationInfoConsumption {
484    /// `events_per_day`.
485    #[serde(rename = "events_per_day")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub events_per_day: Option<i32>,
488}
489
490/// The `ApplicationInfoOnboardingSteps` the API declares.
491#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
492pub struct ApplicationInfoOnboardingSteps {
493    /// `event`.
494    #[serde(rename = "event")]
495    pub event: ApplicationInfoOnboardingStepsEvent,
496    /// `event_type`.
497    #[serde(rename = "event_type")]
498    pub event_type: ApplicationInfoOnboardingStepsEventType,
499    /// `subscription`.
500    #[serde(rename = "subscription")]
501    pub subscription: ApplicationInfoOnboardingStepsSubscription,
502}
503
504/// The `ApplicationInfoQuotas` the API declares.
505#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
506pub struct ApplicationInfoQuotas {
507    /// `days_of_events_retention_limit`.
508    #[serde(rename = "days_of_events_retention_limit")]
509    pub days_of_events_retention_limit: i32,
510    /// `events_per_day_limit`.
511    #[serde(rename = "events_per_day_limit")]
512    pub events_per_day_limit: i32,
513}
514
515/// The `ApplicationPost` the API declares.
516#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
517pub struct ApplicationPost {
518    /// `name`: Name of the application. Length: 2-50 characters.
519    #[serde(rename = "name")]
520    pub name: String,
521    /// `organization_id`: UUID of the organization this application belongs to.
522    #[serde(rename = "organization_id")]
523    pub organization_id: Uuid,
524}
525
526/// The `ApplicationSecret` the API declares.
527#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
528pub struct ApplicationSecret {
529    /// `created_at`.
530    #[serde(rename = "created_at")]
531    pub created_at: DateTime<Utc>,
532    /// `deleted_at`.
533    #[serde(rename = "deleted_at")]
534    #[serde(skip_serializing_if = "Option::is_none")]
535    pub deleted_at: Option<DateTime<Utc>>,
536    /// `name`.
537    #[serde(rename = "name")]
538    #[serde(skip_serializing_if = "Option::is_none")]
539    pub name: Option<String>,
540    /// `token`.
541    #[serde(rename = "token")]
542    pub token: Uuid,
543}
544
545/// The `ApplicationSecretPost` the API declares.
546#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
547pub struct ApplicationSecretPost {
548    /// `application_id`.
549    #[serde(rename = "application_id")]
550    pub application_id: Uuid,
551    /// `name`.
552    #[serde(rename = "name")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub name: Option<String>,
555}
556
557/// The `Event` the API declares.
558#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
559pub struct Event {
560    /// `event_id`.
561    #[serde(rename = "event_id")]
562    pub event_id: Uuid,
563    /// `event_type_name`.
564    #[serde(rename = "event_type_name")]
565    pub event_type_name: String,
566    /// `ip`.
567    #[serde(rename = "ip")]
568    pub ip: String,
569    /// `labels`.
570    #[serde(rename = "labels")]
571    pub labels: Value,
572    /// `metadata`.
573    #[serde(rename = "metadata")]
574    #[serde(skip_serializing_if = "Option::is_none")]
575    pub metadata: Option<Value>,
576    /// `occurred_at`.
577    #[serde(rename = "occurred_at")]
578    pub occurred_at: DateTime<Utc>,
579    /// `payload_content_type`.
580    #[serde(rename = "payload_content_type")]
581    pub payload_content_type: String,
582    /// `received_at`.
583    #[serde(rename = "received_at")]
584    pub received_at: DateTime<Utc>,
585}
586
587/// The `EventPost` the API declares.
588#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
589pub struct EventPost {
590    /// `application_id`: UUID of the application this event belongs to.
591    #[serde(rename = "application_id")]
592    pub application_id: Uuid,
593    /// `event_id`: Optional unique identifier for this event (client-generated UUID). If not provided, a UUIDv7 will be generated by the server.
594    #[serde(rename = "event_id")]
595    #[serde(skip_serializing_if = "Option::is_none")]
596    pub event_id: Option<Uuid>,
597    /// `event_type`: The type of event (e.g., 'user.created', 'order.completed'). Length: 1-200 characters.
598    #[serde(rename = "event_type")]
599    pub event_type: String,
600    /// `labels`: Labels for event filtering and routing to subscriptions.
601    #[serde(rename = "labels")]
602    pub labels: HashMap<String, String>,
603    /// `metadata`: Optional metadata key-value pairs associated with the event.
604    #[serde(rename = "metadata")]
605    #[serde(skip_serializing_if = "Option::is_none")]
606    pub metadata: Option<HashMap<String, String>>,
607    /// `occurred_at`: Timestamp when the event occurred.
608    #[serde(rename = "occurred_at")]
609    pub occurred_at: DateTime<Utc>,
610    /// `payload`: The event payload. For binary content, use base64 encoding. Max length: 699050 characters (512 KiB base64-encoded).
611    #[serde(rename = "payload")]
612    pub payload: String,
613    /// `payload_content_type`: Content type of the payload. Valid values: text/plain, application/json, application/octet-stream+base64. Length: 1-100 characters.
614    #[serde(rename = "payload_content_type")]
615    pub payload_content_type: String,
616}
617
618/// The `EventType` the API declares.
619#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
620pub struct EventType {
621    /// `event_type_name`.
622    #[serde(rename = "event_type_name")]
623    pub event_type_name: String,
624    /// `resource_type_name`.
625    #[serde(rename = "resource_type_name")]
626    pub resource_type_name: String,
627    /// `service_name`.
628    #[serde(rename = "service_name")]
629    pub service_name: String,
630    /// `verb_name`.
631    #[serde(rename = "verb_name")]
632    pub verb_name: String,
633}
634
635/// The `EventTypePost` the API declares.
636#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
637pub struct EventTypePost {
638    /// `application_id`.
639    #[serde(rename = "application_id")]
640    pub application_id: Uuid,
641    /// `resource_type`.
642    #[serde(rename = "resource_type")]
643    pub resource_type: String,
644    /// `service`.
645    #[serde(rename = "service")]
646    pub service: String,
647    /// `verb`.
648    #[serde(rename = "verb")]
649    pub verb: String,
650}
651
652/// The `EventWithPayload` the API declares.
653#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
654pub struct EventWithPayload {
655    /// `event_id`.
656    #[serde(rename = "event_id")]
657    pub event_id: Uuid,
658    /// `event_type_name`.
659    #[serde(rename = "event_type_name")]
660    pub event_type_name: String,
661    /// `ip`.
662    #[serde(rename = "ip")]
663    pub ip: String,
664    /// `labels`.
665    #[serde(rename = "labels")]
666    pub labels: Value,
667    /// `metadata`.
668    #[serde(rename = "metadata")]
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub metadata: Option<Value>,
671    /// `occurred_at`.
672    #[serde(rename = "occurred_at")]
673    pub occurred_at: DateTime<Utc>,
674    /// `payload`.
675    #[serde(rename = "payload")]
676    pub payload: String,
677    /// `payload_content_type`.
678    #[serde(rename = "payload_content_type")]
679    pub payload_content_type: String,
680    /// `received_at`.
681    #[serde(rename = "received_at")]
682    pub received_at: DateTime<Utc>,
683}
684
685/// The `EventsPerDayEntry` the API declares.
686#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
687pub struct EventsPerDayEntry {
688    /// `amount`.
689    #[serde(rename = "amount")]
690    pub amount: i32,
691    /// `application_id`.
692    #[serde(rename = "application_id")]
693    pub application_id: Uuid,
694    /// `application_name`.
695    #[serde(rename = "application_name")]
696    pub application_name: String,
697    /// `date`.
698    #[serde(rename = "date")]
699    pub date: NaiveDate,
700    /// `is_provisional`.
701    #[serde(rename = "is_provisional")]
702    pub is_provisional: bool,
703}
704
705/// The `IngestedEvent` the API declares.
706#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
707pub struct IngestedEvent {
708    /// `application_id`.
709    #[serde(rename = "application_id")]
710    pub application_id: Uuid,
711    /// `event_id`.
712    #[serde(rename = "event_id")]
713    pub event_id: Uuid,
714    /// `received_at`.
715    #[serde(rename = "received_at")]
716    pub received_at: DateTime<Utc>,
717}
718
719/// The `InstanceConfig` the API declares.
720#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
721pub struct InstanceConfig {
722    /// `application_secret_compatibility`.
723    #[serde(rename = "application_secret_compatibility")]
724    pub application_secret_compatibility: bool,
725    /// `auto_db_migration`.
726    #[serde(rename = "auto_db_migration")]
727    pub auto_db_migration: bool,
728    /// `biscuit_public_key`.
729    #[serde(rename = "biscuit_public_key")]
730    pub biscuit_public_key: String,
731    /// `cloudflare_turnstile_site_key`.
732    #[serde(rename = "cloudflare_turnstile_site_key")]
733    #[serde(skip_serializing_if = "Option::is_none")]
734    pub cloudflare_turnstile_site_key: Option<String>,
735    /// `formbricks`.
736    #[serde(rename = "formbricks")]
737    #[serde(skip_serializing_if = "Option::is_none")]
738    pub formbricks: Option<InstanceConfigFormbricks>,
739    /// `matomo`.
740    #[serde(rename = "matomo")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    pub matomo: Option<InstanceConfigMatomo>,
743    /// `password_minimum_length`.
744    #[serde(rename = "password_minimum_length")]
745    pub password_minimum_length: i32,
746    /// `quota_enforcement`.
747    #[serde(rename = "quota_enforcement")]
748    pub quota_enforcement: bool,
749    /// `registration_disabled`.
750    #[serde(rename = "registration_disabled")]
751    pub registration_disabled: bool,
752    /// `support_email_address`.
753    #[serde(rename = "support_email_address")]
754    pub support_email_address: String,
755}
756
757/// The `InstanceConfigFormbricks` the API declares.
758#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
759pub struct InstanceConfigFormbricks {
760    /// `api_host`.
761    #[serde(rename = "api_host")]
762    pub api_host: String,
763    /// `environment_id`.
764    #[serde(rename = "environment_id")]
765    pub environment_id: String,
766}
767
768/// The `InstanceConfigMatomo` the API declares.
769#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
770pub struct InstanceConfigMatomo {
771    /// `site_id`.
772    #[serde(rename = "site_id")]
773    pub site_id: i32,
774    /// `url`.
775    #[serde(rename = "url")]
776    pub url: String,
777}
778
779/// The `Organization` the API declares.
780#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
781pub struct Organization {
782    /// `name`.
783    #[serde(rename = "name")]
784    pub name: String,
785    /// `organization_id`.
786    #[serde(rename = "organization_id")]
787    pub organization_id: Uuid,
788    /// `plan`.
789    #[serde(rename = "plan")]
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub plan: Option<OrganizationPlan>,
792    /// `role`.
793    #[serde(rename = "role")]
794    pub role: String,
795}
796
797/// The `OrganizationInfo` the API declares.
798#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
799pub struct OrganizationInfo {
800    /// `consumption`.
801    #[serde(rename = "consumption")]
802    pub consumption: OrganizationInfoConsumption,
803    /// `name`.
804    #[serde(rename = "name")]
805    pub name: String,
806    /// `onboarding_steps`.
807    #[serde(rename = "onboarding_steps")]
808    pub onboarding_steps: OrganizationInfoOnboardingSteps,
809    /// `organization_id`.
810    #[serde(rename = "organization_id")]
811    pub organization_id: Uuid,
812    /// `plan`.
813    #[serde(rename = "plan")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub plan: Option<OrganizationInfoPlan>,
816    /// `quotas`.
817    #[serde(rename = "quotas")]
818    pub quotas: OrganizationInfoQuotas,
819    /// `users`.
820    #[serde(rename = "users")]
821    pub users: Vec<OrganizationInfoUsers>,
822}
823
824/// The `OrganizationInfoConsumption` the API declares.
825#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
826pub struct OrganizationInfoConsumption {
827    /// `applications`.
828    #[serde(rename = "applications")]
829    #[serde(skip_serializing_if = "Option::is_none")]
830    pub applications: Option<i64>,
831    /// `events_per_day`.
832    #[serde(rename = "events_per_day")]
833    #[serde(skip_serializing_if = "Option::is_none")]
834    pub events_per_day: Option<i64>,
835    /// `members`.
836    #[serde(rename = "members")]
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub members: Option<i64>,
839}
840
841/// The `OrganizationInfoOnboardingSteps` the API declares.
842#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
843pub struct OrganizationInfoOnboardingSteps {
844    /// `application`.
845    #[serde(rename = "application")]
846    pub application: OrganizationInfoOnboardingStepsApplication,
847    /// `event`.
848    #[serde(rename = "event")]
849    pub event: OrganizationInfoOnboardingStepsEvent,
850    /// `event_type`.
851    #[serde(rename = "event_type")]
852    pub event_type: OrganizationInfoOnboardingStepsEventType,
853    /// `subscription`.
854    #[serde(rename = "subscription")]
855    pub subscription: OrganizationInfoOnboardingStepsSubscription,
856}
857
858/// The `OrganizationInfoPlan` the API declares.
859#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
860pub struct OrganizationInfoPlan {
861    /// `label`.
862    #[serde(rename = "label")]
863    pub label: String,
864    /// `name`.
865    #[serde(rename = "name")]
866    pub name: String,
867}
868
869/// The `OrganizationInfoQuotas` the API declares.
870#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
871pub struct OrganizationInfoQuotas {
872    /// `applications_per_organization_limit`.
873    #[serde(rename = "applications_per_organization_limit")]
874    pub applications_per_organization_limit: i32,
875    /// `days_of_events_retention_limit`.
876    #[serde(rename = "days_of_events_retention_limit")]
877    pub days_of_events_retention_limit: i32,
878    /// `events_per_day_limit`.
879    #[serde(rename = "events_per_day_limit")]
880    pub events_per_day_limit: i32,
881    /// `members_per_organization_limit`.
882    #[serde(rename = "members_per_organization_limit")]
883    pub members_per_organization_limit: i32,
884}
885
886/// The `OrganizationInfoUsers` the API declares.
887#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
888pub struct OrganizationInfoUsers {
889    /// `email`.
890    #[serde(rename = "email")]
891    pub email: String,
892    /// `first_name`.
893    #[serde(rename = "first_name")]
894    pub first_name: String,
895    /// `last_name`.
896    #[serde(rename = "last_name")]
897    pub last_name: String,
898    /// `role`.
899    #[serde(rename = "role")]
900    pub role: String,
901    /// `user_id`.
902    #[serde(rename = "user_id")]
903    pub user_id: Uuid,
904}
905
906/// The `OrganizationPlan` the API declares.
907#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
908pub struct OrganizationPlan {
909    /// `label`.
910    #[serde(rename = "label")]
911    pub label: String,
912    /// `name`.
913    #[serde(rename = "name")]
914    pub name: String,
915}
916
917/// The `Problem` the API declares.
918#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
919pub struct Problem {
920    /// `detail`.
921    #[serde(rename = "detail")]
922    pub detail: String,
923    /// `id`: Identifier of the problem that occurred, stable across releases
924    #[serde(rename = "id")]
925    pub id: ProblemId,
926    /// `status`.
927    #[serde(rename = "status")]
928    pub status: i32,
929    /// `title`.
930    #[serde(rename = "title")]
931    pub title: String,
932    /// `type`: Documentation page of this problem, which is also what distinguishes one problem type from another as RFC 7807 asks. Prefer matching on `id`: it says the same thing without parsing a URL.
933    #[serde(rename = "type")]
934    pub type_: String,
935    /// `validation`: Which submitted values were rejected and why, keyed by the name of the field they were submitted under. Carried by validation failures (`Validation`, status 422) and `null` for every other problem, as
936    #[serde(rename = "validation")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub validation: Option<Value>,
939}
940
941/// The `QuotasResponse` the API declares.
942#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
943pub struct QuotasResponse {
944    /// `enabled`.
945    #[serde(rename = "enabled")]
946    pub enabled: bool,
947    /// `limits`.
948    #[serde(rename = "limits")]
949    pub limits: QuotasResponseLimits,
950}
951
952/// The `QuotasResponseLimits` the API declares.
953#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
954pub struct QuotasResponseLimits {
955    /// `global_applications_per_organization_limit`.
956    #[serde(rename = "global_applications_per_organization_limit")]
957    pub global_applications_per_organization_limit: i32,
958    /// `global_days_of_events_retention_limit`.
959    #[serde(rename = "global_days_of_events_retention_limit")]
960    pub global_days_of_events_retention_limit: i32,
961    /// `global_event_types_per_application_limit`.
962    #[serde(rename = "global_event_types_per_application_limit")]
963    pub global_event_types_per_application_limit: i32,
964    /// `global_events_per_day_limit`.
965    #[serde(rename = "global_events_per_day_limit")]
966    pub global_events_per_day_limit: i32,
967    /// `global_members_per_organization_limit`.
968    #[serde(rename = "global_members_per_organization_limit")]
969    pub global_members_per_organization_limit: i32,
970    /// `global_subscriptions_per_application_limit`.
971    #[serde(rename = "global_subscriptions_per_application_limit")]
972    pub global_subscriptions_per_application_limit: i32,
973}
974
975/// The `ReplayEvent` the API declares.
976#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
977pub struct ReplayEvent {
978    /// `application_id`.
979    #[serde(rename = "application_id")]
980    pub application_id: Uuid,
981}
982
983/// The `RequestAttempt` the API declares.
984#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
985pub struct RequestAttempt {
986    /// `created_at`.
987    #[serde(rename = "created_at")]
988    pub created_at: DateTime<Utc>,
989    /// `delay_until`.
990    #[serde(rename = "delay_until")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub delay_until: Option<DateTime<Utc>>,
993    /// `event`.
994    #[serde(rename = "event")]
995    pub event: RequestAttemptEvent,
996    /// `event_id`.
997    #[serde(rename = "event_id")]
998    pub event_id: Uuid,
999    /// `failed_at`.
1000    #[serde(rename = "failed_at")]
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    pub failed_at: Option<DateTime<Utc>>,
1003    /// `http_response_status`.
1004    #[serde(rename = "http_response_status")]
1005    #[serde(skip_serializing_if = "Option::is_none")]
1006    pub http_response_status: Option<i32>,
1007    /// `picked_at`.
1008    #[serde(rename = "picked_at")]
1009    #[serde(skip_serializing_if = "Option::is_none")]
1010    pub picked_at: Option<DateTime<Utc>>,
1011    /// `request_attempt_id`.
1012    #[serde(rename = "request_attempt_id")]
1013    pub request_attempt_id: Uuid,
1014    /// `response_id`.
1015    #[serde(rename = "response_id")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub response_id: Option<Uuid>,
1018    /// `retry_count`.
1019    #[serde(rename = "retry_count")]
1020    pub retry_count: i32,
1021    /// `status`: Status of a request attempt. The 'type' field indicates the status variant. - waiting: {type, since, until} - Scheduled for future delivery - pending: {type, since} - Ready to be processed - in_progre
1022    #[serde(rename = "status")]
1023    pub status: RequestAttemptStatus,
1024    /// `subscription`.
1025    #[serde(rename = "subscription")]
1026    pub subscription: RequestAttemptSubscription,
1027    /// `succeeded_at`.
1028    #[serde(rename = "succeeded_at")]
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    pub succeeded_at: Option<DateTime<Utc>>,
1031}
1032
1033/// The `RequestAttemptEvent` the API declares.
1034#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1035pub struct RequestAttemptEvent {
1036    /// `event_id`.
1037    #[serde(rename = "event_id")]
1038    pub event_id: Uuid,
1039    /// `event_type_name`.
1040    #[serde(rename = "event_type_name")]
1041    pub event_type_name: String,
1042}
1043
1044/// The `RequestAttemptStatus` the API declares.
1045#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1046pub struct RequestAttemptStatus {
1047    /// `at`: Timestamp when completed (present in successful, failed)
1048    #[serde(rename = "at")]
1049    #[serde(skip_serializing_if = "Option::is_none")]
1050    pub at: Option<DateTime<Utc>>,
1051    /// `full_processing_ms`: Total processing time in milliseconds (present in successful, failed)
1052    #[serde(rename = "full_processing_ms")]
1053    #[serde(skip_serializing_if = "Option::is_none")]
1054    pub full_processing_ms: Option<i64>,
1055    /// `since`: Timestamp when the status started (present in waiting, pending, in_progress)
1056    #[serde(rename = "since")]
1057    #[serde(skip_serializing_if = "Option::is_none")]
1058    pub since: Option<DateTime<Utc>>,
1059    /// `type`: Status type discriminator. One of: waiting, pending, in_progress, successful, failed
1060    #[serde(rename = "type")]
1061    pub type_: RequestAttemptStatusType,
1062    /// `until`: Timestamp until which waiting (only present in waiting status)
1063    #[serde(rename = "until")]
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub until: Option<DateTime<Utc>>,
1066}
1067
1068/// The `RequestAttemptSubscription` the API declares.
1069#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1070pub struct RequestAttemptSubscription {
1071    /// `description`.
1072    #[serde(rename = "description")]
1073    #[serde(skip_serializing_if = "Option::is_none")]
1074    pub description: Option<String>,
1075    /// `subscription_id`.
1076    #[serde(rename = "subscription_id")]
1077    pub subscription_id: Uuid,
1078}
1079
1080/// The `Response` the API declares.
1081#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1082pub struct Response {
1083    /// `body`.
1084    #[serde(rename = "body")]
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    pub body: Option<String>,
1087    /// `elapsed_time_ms`.
1088    #[serde(rename = "elapsed_time_ms")]
1089    #[serde(skip_serializing_if = "Option::is_none")]
1090    pub elapsed_time_ms: Option<i32>,
1091    /// `headers`.
1092    #[serde(rename = "headers")]
1093    #[serde(skip_serializing_if = "Option::is_none")]
1094    pub headers: Option<HashMap<String, String>>,
1095    /// `http_code`.
1096    #[serde(rename = "http_code")]
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub http_code: Option<i32>,
1099    /// `response_error_name`.
1100    #[serde(rename = "response_error_name")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub response_error_name: Option<String>,
1103    /// `response_id`.
1104    #[serde(rename = "response_id")]
1105    pub response_id: Uuid,
1106}
1107
1108/// The `ServiceToken` the API declares.
1109#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1110pub struct ServiceToken {
1111    /// `biscuit`.
1112    #[serde(rename = "biscuit")]
1113    pub biscuit: String,
1114    /// `created_at`.
1115    #[serde(rename = "created_at")]
1116    pub created_at: DateTime<Utc>,
1117    /// `name`.
1118    #[serde(rename = "name")]
1119    pub name: String,
1120    /// `token_id`.
1121    #[serde(rename = "token_id")]
1122    pub token_id: Uuid,
1123}
1124
1125/// The `ServiceTokenPost` the API declares.
1126#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1127pub struct ServiceTokenPost {
1128    /// `name`.
1129    #[serde(rename = "name")]
1130    pub name: String,
1131    /// `organization_id`.
1132    #[serde(rename = "organization_id")]
1133    pub organization_id: Uuid,
1134}
1135
1136/// The `Subscription` the API declares.
1137#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1138pub struct Subscription {
1139    /// `application_id`.
1140    #[serde(rename = "application_id")]
1141    pub application_id: Uuid,
1142    /// `created_at`.
1143    #[serde(rename = "created_at")]
1144    pub created_at: DateTime<Utc>,
1145    /// `dedicated_workers`.
1146    #[serde(rename = "dedicated_workers")]
1147    pub dedicated_workers: Vec<String>,
1148    /// `description`.
1149    #[serde(rename = "description")]
1150    #[serde(skip_serializing_if = "Option::is_none")]
1151    pub description: Option<String>,
1152    /// `event_types`.
1153    #[serde(rename = "event_types")]
1154    pub event_types: Vec<String>,
1155    /// `is_enabled`.
1156    #[serde(rename = "is_enabled")]
1157    pub is_enabled: bool,
1158    /// `label_key`: _Kept for backward compatibility, you should use `labels`_
1159    #[serde(rename = "label_key")]
1160    pub label_key: String,
1161    /// `label_value`: _Kept for backward compatibility, you should use `labels`_
1162    #[serde(rename = "label_value")]
1163    pub label_value: String,
1164    /// `labels`.
1165    #[serde(rename = "labels")]
1166    pub labels: HashMap<String, String>,
1167    /// `metadata`.
1168    #[serde(rename = "metadata")]
1169    pub metadata: HashMap<String, String>,
1170    /// `secret`.
1171    #[serde(rename = "secret")]
1172    pub secret: Uuid,
1173    /// `subscription_id`.
1174    #[serde(rename = "subscription_id")]
1175    pub subscription_id: Uuid,
1176    /// `target`.
1177    #[serde(rename = "target")]
1178    pub target: SubscriptionTarget,
1179    /// `updated_at`.
1180    #[serde(rename = "updated_at")]
1181    pub updated_at: DateTime<Utc>,
1182}
1183
1184/// The `SubscriptionPost` the API declares.
1185#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1186pub struct SubscriptionPost {
1187    /// `application_id`.
1188    #[serde(rename = "application_id")]
1189    pub application_id: Uuid,
1190    /// `dedicated_workers`.
1191    #[serde(rename = "dedicated_workers")]
1192    #[serde(skip_serializing_if = "Option::is_none")]
1193    pub dedicated_workers: Option<Vec<String>>,
1194    /// `description`.
1195    #[serde(rename = "description")]
1196    #[serde(skip_serializing_if = "Option::is_none")]
1197    pub description: Option<String>,
1198    /// `event_types`.
1199    #[serde(rename = "event_types")]
1200    pub event_types: Vec<String>,
1201    /// `is_enabled`.
1202    #[serde(rename = "is_enabled")]
1203    pub is_enabled: bool,
1204    /// `label_key`: _Kept for backward compatibility, you should use `labels`_
1205    #[serde(rename = "label_key")]
1206    #[serde(skip_serializing_if = "Option::is_none")]
1207    pub label_key: Option<String>,
1208    /// `label_value`: _Kept for backward compatibility, you should use `labels`_
1209    #[serde(rename = "label_value")]
1210    #[serde(skip_serializing_if = "Option::is_none")]
1211    pub label_value: Option<String>,
1212    /// `labels`.
1213    #[serde(rename = "labels")]
1214    #[serde(skip_serializing_if = "Option::is_none")]
1215    pub labels: Option<HashMap<String, String>>,
1216    /// `metadata`.
1217    #[serde(rename = "metadata")]
1218    #[serde(skip_serializing_if = "Option::is_none")]
1219    pub metadata: Option<HashMap<String, String>>,
1220    /// `target`.
1221    #[serde(rename = "target")]
1222    pub target: SubscriptionPostTarget,
1223}
1224
1225/// The `SubscriptionPostTarget` the API declares.
1226#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1227pub struct SubscriptionPostTarget {
1228    /// `headers`.
1229    #[serde(rename = "headers")]
1230    pub headers: Value,
1231    /// `method`.
1232    #[serde(rename = "method")]
1233    pub method: String,
1234    /// `type`.
1235    #[serde(rename = "type")]
1236    pub type_: String,
1237    /// `url`.
1238    #[serde(rename = "url")]
1239    pub url: Url,
1240}
1241
1242/// The `SubscriptionTarget` the API declares.
1243#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1244pub struct SubscriptionTarget {
1245    /// `headers`.
1246    #[serde(rename = "headers")]
1247    pub headers: Value,
1248    /// `method`.
1249    #[serde(rename = "method")]
1250    pub method: String,
1251    /// `type`.
1252    #[serde(rename = "type")]
1253    pub type_: String,
1254    /// `url`.
1255    #[serde(rename = "url")]
1256    pub url: Url,
1257}