azure_devops_rust_api/hooks/
models.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![allow(non_camel_case_types)]
4#![allow(unused_imports)]
5use serde::de::{value, Deserializer, IntoDeserializer};
6use serde::{Deserialize, Serialize, Serializer};
7use std::str::FromStr;
8#[doc = "Defines the data contract of a consumer."]
9#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10pub struct Consumer {
11    #[doc = "Links"]
12    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
13    pub links: Option<serde_json::Value>,
14    #[doc = "Gets this consumer's actions."]
15    #[serde(
16        default,
17        deserialize_with = "crate::serde::deserialize_null_as_default",
18        skip_serializing_if = "Vec::is_empty"
19    )]
20    pub actions: Vec<ConsumerAction>,
21    #[doc = "Gets or sets this consumer's authentication type."]
22    #[serde(
23        rename = "authenticationType",
24        default,
25        skip_serializing_if = "Option::is_none"
26    )]
27    pub authentication_type: Option<consumer::AuthenticationType>,
28    #[doc = "Gets or sets this consumer's localized description."]
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
31    #[doc = "Describes how to configure a subscription that is managed externally."]
32    #[serde(
33        rename = "externalConfiguration",
34        default,
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub external_configuration: Option<ExternalConfigurationDescriptor>,
38    #[doc = "Gets or sets this consumer's identifier."]
39    #[serde(default, skip_serializing_if = "Option::is_none")]
40    pub id: Option<String>,
41    #[doc = "Gets or sets this consumer's image URL, if any."]
42    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
43    pub image_url: Option<String>,
44    #[doc = "Gets or sets this consumer's information URL, if any."]
45    #[serde(
46        rename = "informationUrl",
47        default,
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub information_url: Option<String>,
51    #[doc = "Gets or sets this consumer's input descriptors."]
52    #[serde(
53        rename = "inputDescriptors",
54        default,
55        deserialize_with = "crate::serde::deserialize_null_as_default",
56        skip_serializing_if = "Vec::is_empty"
57    )]
58    pub input_descriptors: Vec<InputDescriptor>,
59    #[doc = "Gets or sets this consumer's localized name."]
60    #[serde(default, skip_serializing_if = "Option::is_none")]
61    pub name: Option<String>,
62    #[doc = "The url for this resource"]
63    #[serde(default, skip_serializing_if = "Option::is_none")]
64    pub url: Option<String>,
65}
66impl Consumer {
67    pub fn new() -> Self {
68        Self::default()
69    }
70}
71pub mod consumer {
72    use super::*;
73    #[doc = "Gets or sets this consumer's authentication type."]
74    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
75    pub enum AuthenticationType {
76        #[serde(rename = "none")]
77        None,
78        #[serde(rename = "oAuth")]
79        OAuth,
80        #[serde(rename = "external")]
81        External,
82    }
83}
84#[doc = "Defines the data contract of a consumer action."]
85#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
86pub struct ConsumerAction {
87    #[doc = "Links"]
88    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
89    pub links: Option<serde_json::Value>,
90    #[doc = "Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription."]
91    #[serde(
92        rename = "allowResourceVersionOverride",
93        default,
94        skip_serializing_if = "Option::is_none"
95    )]
96    pub allow_resource_version_override: Option<bool>,
97    #[doc = "Gets or sets the identifier of the consumer to which this action belongs."]
98    #[serde(
99        rename = "consumerId",
100        default,
101        skip_serializing_if = "Option::is_none"
102    )]
103    pub consumer_id: Option<String>,
104    #[doc = "Gets or sets this action's localized description."]
105    #[serde(default, skip_serializing_if = "Option::is_none")]
106    pub description: Option<String>,
107    #[doc = "Gets or sets this action's identifier."]
108    #[serde(default, skip_serializing_if = "Option::is_none")]
109    pub id: Option<String>,
110    #[doc = "Gets or sets this action's input descriptors."]
111    #[serde(
112        rename = "inputDescriptors",
113        default,
114        deserialize_with = "crate::serde::deserialize_null_as_default",
115        skip_serializing_if = "Vec::is_empty"
116    )]
117    pub input_descriptors: Vec<InputDescriptor>,
118    #[doc = "Gets or sets this action's localized name."]
119    #[serde(default, skip_serializing_if = "Option::is_none")]
120    pub name: Option<String>,
121    #[doc = "Gets or sets this action's supported event identifiers."]
122    #[serde(
123        rename = "supportedEventTypes",
124        default,
125        deserialize_with = "crate::serde::deserialize_null_as_default",
126        skip_serializing_if = "Vec::is_empty"
127    )]
128    pub supported_event_types: Vec<String>,
129    #[doc = "Gets or sets this action's supported resource versions."]
130    #[serde(
131        rename = "supportedResourceVersions",
132        default,
133        skip_serializing_if = "Option::is_none"
134    )]
135    pub supported_resource_versions: Option<serde_json::Value>,
136    #[doc = "The url for this resource"]
137    #[serde(default, skip_serializing_if = "Option::is_none")]
138    pub url: Option<String>,
139}
140impl ConsumerAction {
141    pub fn new() -> Self {
142        Self::default()
143    }
144}
145#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
146pub struct ConsumerActionList {
147    #[serde(default, skip_serializing_if = "Option::is_none")]
148    pub count: Option<i32>,
149    #[serde(
150        default,
151        deserialize_with = "crate::serde::deserialize_null_as_default",
152        skip_serializing_if = "Vec::is_empty"
153    )]
154    pub value: Vec<ConsumerAction>,
155}
156impl ConsumerActionList {
157    pub fn new() -> Self {
158        Self::default()
159    }
160}
161#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
162pub struct ConsumerList {
163    #[serde(default, skip_serializing_if = "Option::is_none")]
164    pub count: Option<i32>,
165    #[serde(
166        default,
167        deserialize_with = "crate::serde::deserialize_null_as_default",
168        skip_serializing_if = "Vec::is_empty"
169    )]
170    pub value: Vec<Consumer>,
171}
172impl ConsumerList {
173    pub fn new() -> Self {
174        Self::default()
175    }
176}
177#[doc = "Encapsulates the properties of an event."]
178#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
179pub struct Event {
180    #[doc = "Gets or sets the UTC-based date and time that this event was created."]
181    #[serde(
182        rename = "createdDate",
183        default,
184        skip_serializing_if = "Option::is_none",
185        with = "crate::date_time::rfc3339::option"
186    )]
187    pub created_date: Option<time::OffsetDateTime>,
188    #[doc = "Provides different formats of an event message"]
189    #[serde(
190        rename = "detailedMessage",
191        default,
192        skip_serializing_if = "Option::is_none"
193    )]
194    pub detailed_message: Option<FormattedEventMessage>,
195    #[doc = "Gets or sets the type of this event."]
196    #[serde(rename = "eventType", default, skip_serializing_if = "Option::is_none")]
197    pub event_type: Option<String>,
198    #[doc = "Gets or sets the unique identifier of this event."]
199    #[serde(default, skip_serializing_if = "Option::is_none")]
200    pub id: Option<String>,
201    #[doc = "Provides different formats of an event message"]
202    #[serde(default, skip_serializing_if = "Option::is_none")]
203    pub message: Option<FormattedEventMessage>,
204    #[doc = "Gets or sets the identifier of the publisher that raised this event."]
205    #[serde(
206        rename = "publisherId",
207        default,
208        skip_serializing_if = "Option::is_none"
209    )]
210    pub publisher_id: Option<String>,
211    #[doc = "Gets or sets the data associated with this event."]
212    #[serde(default, skip_serializing_if = "Option::is_none")]
213    pub resource: Option<serde_json::Value>,
214    #[doc = "Gets or sets the resource containers."]
215    #[serde(
216        rename = "resourceContainers",
217        default,
218        skip_serializing_if = "Option::is_none"
219    )]
220    pub resource_containers: Option<serde_json::Value>,
221    #[doc = "Gets or sets the version of the data associated with this event."]
222    #[serde(
223        rename = "resourceVersion",
224        default,
225        skip_serializing_if = "Option::is_none"
226    )]
227    pub resource_version: Option<String>,
228    #[doc = "Represents a session token to be attached in Events for Consumer actions that need it."]
229    #[serde(
230        rename = "sessionToken",
231        default,
232        skip_serializing_if = "Option::is_none"
233    )]
234    pub session_token: Option<SessionToken>,
235}
236impl Event {
237    pub fn new() -> Self {
238        Self::default()
239    }
240}
241#[doc = "Describes a type of event"]
242#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
243pub struct EventTypeDescriptor {
244    #[doc = "A localized description of the event type"]
245    #[serde(default, skip_serializing_if = "Option::is_none")]
246    pub description: Option<String>,
247    #[doc = "A unique id for the event type"]
248    #[serde(default, skip_serializing_if = "Option::is_none")]
249    pub id: Option<String>,
250    #[doc = "Event-specific inputs"]
251    #[serde(
252        rename = "inputDescriptors",
253        default,
254        deserialize_with = "crate::serde::deserialize_null_as_default",
255        skip_serializing_if = "Vec::is_empty"
256    )]
257    pub input_descriptors: Vec<InputDescriptor>,
258    #[doc = "A localized friendly name for the event type"]
259    #[serde(default, skip_serializing_if = "Option::is_none")]
260    pub name: Option<String>,
261    #[doc = "A unique id for the publisher of this event type"]
262    #[serde(
263        rename = "publisherId",
264        default,
265        skip_serializing_if = "Option::is_none"
266    )]
267    pub publisher_id: Option<String>,
268    #[doc = "Supported versions for the event's resource payloads."]
269    #[serde(
270        rename = "supportedResourceVersions",
271        default,
272        deserialize_with = "crate::serde::deserialize_null_as_default",
273        skip_serializing_if = "Vec::is_empty"
274    )]
275    pub supported_resource_versions: Vec<String>,
276    #[doc = "The url for this resource"]
277    #[serde(default, skip_serializing_if = "Option::is_none")]
278    pub url: Option<String>,
279}
280impl EventTypeDescriptor {
281    pub fn new() -> Self {
282        Self::default()
283    }
284}
285#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
286pub struct EventTypeDescriptorList {
287    #[serde(default, skip_serializing_if = "Option::is_none")]
288    pub count: Option<i32>,
289    #[serde(
290        default,
291        deserialize_with = "crate::serde::deserialize_null_as_default",
292        skip_serializing_if = "Vec::is_empty"
293    )]
294    pub value: Vec<EventTypeDescriptor>,
295}
296impl EventTypeDescriptorList {
297    pub fn new() -> Self {
298        Self::default()
299    }
300}
301#[doc = "Describes how to configure a subscription that is managed externally."]
302#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
303pub struct ExternalConfigurationDescriptor {
304    #[doc = "Url of the site to create this type of subscription."]
305    #[serde(
306        rename = "createSubscriptionUrl",
307        default,
308        skip_serializing_if = "Option::is_none"
309    )]
310    pub create_subscription_url: Option<String>,
311    #[doc = "The name of an input property that contains the URL to edit a subscription."]
312    #[serde(
313        rename = "editSubscriptionPropertyName",
314        default,
315        skip_serializing_if = "Option::is_none"
316    )]
317    pub edit_subscription_property_name: Option<String>,
318    #[doc = "True if the external configuration applies only to hosted."]
319    #[serde(
320        rename = "hostedOnly",
321        default,
322        skip_serializing_if = "Option::is_none"
323    )]
324    pub hosted_only: Option<bool>,
325}
326impl ExternalConfigurationDescriptor {
327    pub fn new() -> Self {
328        Self::default()
329    }
330}
331#[doc = "Provides different formats of an event message"]
332#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
333pub struct FormattedEventMessage {
334    #[doc = "Gets or sets the html format of the message"]
335    #[serde(default, skip_serializing_if = "Option::is_none")]
336    pub html: Option<String>,
337    #[doc = "Gets or sets the markdown format of the message"]
338    #[serde(default, skip_serializing_if = "Option::is_none")]
339    pub markdown: Option<String>,
340    #[doc = "Gets or sets the raw text of the message"]
341    #[serde(default, skip_serializing_if = "Option::is_none")]
342    pub text: Option<String>,
343}
344impl FormattedEventMessage {
345    pub fn new() -> Self {
346        Self::default()
347    }
348}
349#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
350pub struct GraphSubjectBase {
351    #[doc = "Links"]
352    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
353    pub links: Option<serde_json::Value>,
354    #[doc = "The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations."]
355    #[serde(default, skip_serializing_if = "Option::is_none")]
356    pub descriptor: Option<String>,
357    #[doc = "This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider."]
358    #[serde(
359        rename = "displayName",
360        default,
361        skip_serializing_if = "Option::is_none"
362    )]
363    pub display_name: Option<String>,
364    #[doc = "This url is the full route to the source resource of this graph subject."]
365    #[serde(default, skip_serializing_if = "Option::is_none")]
366    pub url: Option<String>,
367}
368impl GraphSubjectBase {
369    pub fn new() -> Self {
370        Self::default()
371    }
372}
373#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
374pub struct IdentityRef {
375    #[serde(flatten)]
376    pub graph_subject_base: GraphSubjectBase,
377    #[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
378    #[serde(
379        rename = "directoryAlias",
380        default,
381        skip_serializing_if = "Option::is_none"
382    )]
383    pub directory_alias: Option<String>,
384    #[serde(default, skip_serializing_if = "Option::is_none")]
385    pub id: Option<String>,
386    #[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
387    #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
388    pub image_url: Option<String>,
389    #[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
390    #[serde(default, skip_serializing_if = "Option::is_none")]
391    pub inactive: Option<bool>,
392    #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
393    #[serde(
394        rename = "isAadIdentity",
395        default,
396        skip_serializing_if = "Option::is_none"
397    )]
398    pub is_aad_identity: Option<bool>,
399    #[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
400    #[serde(
401        rename = "isContainer",
402        default,
403        skip_serializing_if = "Option::is_none"
404    )]
405    pub is_container: Option<bool>,
406    #[serde(
407        rename = "isDeletedInOrigin",
408        default,
409        skip_serializing_if = "Option::is_none"
410    )]
411    pub is_deleted_in_origin: Option<bool>,
412    #[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
413    #[serde(
414        rename = "profileUrl",
415        default,
416        skip_serializing_if = "Option::is_none"
417    )]
418    pub profile_url: Option<String>,
419    #[doc = "Deprecated - use Domain+PrincipalName instead"]
420    #[serde(
421        rename = "uniqueName",
422        default,
423        skip_serializing_if = "Option::is_none"
424    )]
425    pub unique_name: Option<String>,
426}
427impl IdentityRef {
428    pub fn new() -> Self {
429        Self::default()
430    }
431}
432#[doc = "Describes an input for subscriptions."]
433#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
434pub struct InputDescriptor {
435    #[doc = "The ids of all inputs that the value of this input is dependent on."]
436    #[serde(
437        rename = "dependencyInputIds",
438        default,
439        deserialize_with = "crate::serde::deserialize_null_as_default",
440        skip_serializing_if = "Vec::is_empty"
441    )]
442    pub dependency_input_ids: Vec<String>,
443    #[doc = "Description of what this input is used for"]
444    #[serde(default, skip_serializing_if = "Option::is_none")]
445    pub description: Option<String>,
446    #[doc = "The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group."]
447    #[serde(rename = "groupName", default, skip_serializing_if = "Option::is_none")]
448    pub group_name: Option<String>,
449    #[doc = "If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change."]
450    #[serde(
451        rename = "hasDynamicValueInformation",
452        default,
453        skip_serializing_if = "Option::is_none"
454    )]
455    pub has_dynamic_value_information: Option<bool>,
456    #[doc = "Identifier for the subscription input"]
457    #[serde(default, skip_serializing_if = "Option::is_none")]
458    pub id: Option<String>,
459    #[doc = "Mode in which the value of this input should be entered"]
460    #[serde(rename = "inputMode", default, skip_serializing_if = "Option::is_none")]
461    pub input_mode: Option<input_descriptor::InputMode>,
462    #[doc = "Gets whether this input is confidential, such as for a password or application key"]
463    #[serde(
464        rename = "isConfidential",
465        default,
466        skip_serializing_if = "Option::is_none"
467    )]
468    pub is_confidential: Option<bool>,
469    #[doc = "Localized name which can be shown as a label for the subscription input"]
470    #[serde(default, skip_serializing_if = "Option::is_none")]
471    pub name: Option<String>,
472    #[doc = "Custom properties for the input which can be used by the service provider"]
473    #[serde(default, skip_serializing_if = "Option::is_none")]
474    pub properties: Option<serde_json::Value>,
475    #[doc = "Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional."]
476    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
477    pub type_: Option<String>,
478    #[doc = "Gets whether this input is included in the default generated action description."]
479    #[serde(
480        rename = "useInDefaultDescription",
481        default,
482        skip_serializing_if = "Option::is_none"
483    )]
484    pub use_in_default_description: Option<bool>,
485    #[doc = "Describes what values are valid for a subscription input"]
486    #[serde(default, skip_serializing_if = "Option::is_none")]
487    pub validation: Option<InputValidation>,
488    #[doc = "A hint for input value. It can be used in the UI as the input placeholder."]
489    #[serde(rename = "valueHint", default, skip_serializing_if = "Option::is_none")]
490    pub value_hint: Option<String>,
491    #[doc = "Information about the possible/allowed values for a given subscription input"]
492    #[serde(default, skip_serializing_if = "Option::is_none")]
493    pub values: Option<InputValues>,
494}
495impl InputDescriptor {
496    pub fn new() -> Self {
497        Self::default()
498    }
499}
500pub mod input_descriptor {
501    use super::*;
502    #[doc = "Mode in which the value of this input should be entered"]
503    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
504    pub enum InputMode {
505        #[serde(rename = "none")]
506        None,
507        #[serde(rename = "textBox")]
508        TextBox,
509        #[serde(rename = "passwordBox")]
510        PasswordBox,
511        #[serde(rename = "combo")]
512        Combo,
513        #[serde(rename = "radioButtons")]
514        RadioButtons,
515        #[serde(rename = "checkBox")]
516        CheckBox,
517        #[serde(rename = "textArea")]
518        TextArea,
519    }
520}
521#[doc = "Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true."]
522#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
523pub struct InputFilter {
524    #[doc = "Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true."]
525    #[serde(
526        default,
527        deserialize_with = "crate::serde::deserialize_null_as_default",
528        skip_serializing_if = "Vec::is_empty"
529    )]
530    pub conditions: Vec<InputFilterCondition>,
531}
532impl InputFilter {
533    pub fn new() -> Self {
534        Self::default()
535    }
536}
537#[doc = "An expression which can be applied to filter a list of subscription inputs"]
538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
539pub struct InputFilterCondition {
540    #[doc = "Whether or not to do a case sensitive match"]
541    #[serde(
542        rename = "caseSensitive",
543        default,
544        skip_serializing_if = "Option::is_none"
545    )]
546    pub case_sensitive: Option<bool>,
547    #[doc = "The Id of the input to filter on"]
548    #[serde(rename = "inputId", default, skip_serializing_if = "Option::is_none")]
549    pub input_id: Option<String>,
550    #[doc = "The \"expected\" input value to compare with the actual input value"]
551    #[serde(
552        rename = "inputValue",
553        default,
554        skip_serializing_if = "Option::is_none"
555    )]
556    pub input_value: Option<String>,
557    #[doc = "The operator applied between the expected and actual input value"]
558    #[serde(default, skip_serializing_if = "Option::is_none")]
559    pub operator: Option<input_filter_condition::Operator>,
560}
561impl InputFilterCondition {
562    pub fn new() -> Self {
563        Self::default()
564    }
565}
566pub mod input_filter_condition {
567    use super::*;
568    #[doc = "The operator applied between the expected and actual input value"]
569    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
570    pub enum Operator {
571        #[serde(rename = "equals")]
572        Equals,
573        #[serde(rename = "notEquals")]
574        NotEquals,
575    }
576}
577#[doc = "Describes what values are valid for a subscription input"]
578#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
579pub struct InputValidation {
580    #[doc = "Gets or sets the data type to validate."]
581    #[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
582    pub data_type: Option<input_validation::DataType>,
583    #[doc = "Gets or sets if this is a required field."]
584    #[serde(
585        rename = "isRequired",
586        default,
587        skip_serializing_if = "Option::is_none"
588    )]
589    pub is_required: Option<bool>,
590    #[doc = "Gets or sets the maximum length of this descriptor."]
591    #[serde(rename = "maxLength", default, skip_serializing_if = "Option::is_none")]
592    pub max_length: Option<i32>,
593    #[doc = "Gets or sets the minimum value for this descriptor."]
594    #[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
595    pub max_value: Option<f32>,
596    #[doc = "Gets or sets the minimum length of this descriptor."]
597    #[serde(rename = "minLength", default, skip_serializing_if = "Option::is_none")]
598    pub min_length: Option<i32>,
599    #[doc = "Gets or sets the minimum value for this descriptor."]
600    #[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
601    pub min_value: Option<f32>,
602    #[doc = "Gets or sets the pattern to validate."]
603    #[serde(default, skip_serializing_if = "Option::is_none")]
604    pub pattern: Option<String>,
605    #[doc = "Gets or sets the error on pattern mismatch."]
606    #[serde(
607        rename = "patternMismatchErrorMessage",
608        default,
609        skip_serializing_if = "Option::is_none"
610    )]
611    pub pattern_mismatch_error_message: Option<String>,
612}
613impl InputValidation {
614    pub fn new() -> Self {
615        Self::default()
616    }
617}
618pub mod input_validation {
619    use super::*;
620    #[doc = "Gets or sets the data type to validate."]
621    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
622    pub enum DataType {
623        #[serde(rename = "none")]
624        None,
625        #[serde(rename = "string")]
626        String,
627        #[serde(rename = "number")]
628        Number,
629        #[serde(rename = "boolean")]
630        Boolean,
631        #[serde(rename = "guid")]
632        Guid,
633        #[serde(rename = "uri")]
634        Uri,
635    }
636}
637#[doc = "Information about a single value for an input"]
638#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
639pub struct InputValue {
640    #[doc = "Any other data about this input"]
641    #[serde(default, skip_serializing_if = "Option::is_none")]
642    pub data: Option<serde_json::Value>,
643    #[doc = "The text to show for the display of this value"]
644    #[serde(
645        rename = "displayValue",
646        default,
647        skip_serializing_if = "Option::is_none"
648    )]
649    pub display_value: Option<String>,
650    #[doc = "The value to store for this input"]
651    #[serde(default, skip_serializing_if = "Option::is_none")]
652    pub value: Option<String>,
653}
654impl InputValue {
655    pub fn new() -> Self {
656        Self::default()
657    }
658}
659#[doc = "Information about the possible/allowed values for a given subscription input"]
660#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
661pub struct InputValues {
662    #[doc = "The default value to use for this input"]
663    #[serde(
664        rename = "defaultValue",
665        default,
666        skip_serializing_if = "Option::is_none"
667    )]
668    pub default_value: Option<String>,
669    #[doc = "Error information related to a subscription input value."]
670    #[serde(default, skip_serializing_if = "Option::is_none")]
671    pub error: Option<InputValuesError>,
672    #[doc = "The id of the input"]
673    #[serde(rename = "inputId", default, skip_serializing_if = "Option::is_none")]
674    pub input_id: Option<String>,
675    #[doc = "Should this input be disabled"]
676    #[serde(
677        rename = "isDisabled",
678        default,
679        skip_serializing_if = "Option::is_none"
680    )]
681    pub is_disabled: Option<bool>,
682    #[doc = "Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False)"]
683    #[serde(
684        rename = "isLimitedToPossibleValues",
685        default,
686        skip_serializing_if = "Option::is_none"
687    )]
688    pub is_limited_to_possible_values: Option<bool>,
689    #[doc = "Should this input be made read-only"]
690    #[serde(
691        rename = "isReadOnly",
692        default,
693        skip_serializing_if = "Option::is_none"
694    )]
695    pub is_read_only: Option<bool>,
696    #[doc = "Possible values that this input can take"]
697    #[serde(
698        rename = "possibleValues",
699        default,
700        deserialize_with = "crate::serde::deserialize_null_as_default",
701        skip_serializing_if = "Vec::is_empty"
702    )]
703    pub possible_values: Vec<InputValue>,
704}
705impl InputValues {
706    pub fn new() -> Self {
707        Self::default()
708    }
709}
710#[doc = "Error information related to a subscription input value."]
711#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
712pub struct InputValuesError {
713    #[doc = "The error message."]
714    #[serde(default, skip_serializing_if = "Option::is_none")]
715    pub message: Option<String>,
716}
717impl InputValuesError {
718    pub fn new() -> Self {
719        Self::default()
720    }
721}
722#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
723pub struct InputValuesQuery {
724    #[serde(
725        rename = "currentValues",
726        default,
727        skip_serializing_if = "Option::is_none"
728    )]
729    pub current_values: Option<serde_json::Value>,
730    #[doc = "The input values to return on input, and the result from the consumer on output."]
731    #[serde(
732        rename = "inputValues",
733        default,
734        deserialize_with = "crate::serde::deserialize_null_as_default",
735        skip_serializing_if = "Vec::is_empty"
736    )]
737    pub input_values: Vec<InputValues>,
738    #[doc = "Subscription containing information about the publisher/consumer and the current input values"]
739    #[serde(default, skip_serializing_if = "Option::is_none")]
740    pub resource: Option<serde_json::Value>,
741}
742impl InputValuesQuery {
743    pub fn new() -> Self {
744        Self::default()
745    }
746}
747#[doc = "Defines the data contract of the result of processing an event for a subscription."]
748#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
749pub struct Notification {
750    #[doc = "Gets or sets date and time that this result was created."]
751    #[serde(
752        rename = "createdDate",
753        default,
754        skip_serializing_if = "Option::is_none",
755        with = "crate::date_time::rfc3339::option"
756    )]
757    pub created_date: Option<time::OffsetDateTime>,
758    #[doc = "Defines the data contract of notification details."]
759    #[serde(default, skip_serializing_if = "Option::is_none")]
760    pub details: Option<NotificationDetails>,
761    #[doc = "The event id associated with this notification"]
762    #[serde(rename = "eventId", default, skip_serializing_if = "Option::is_none")]
763    pub event_id: Option<String>,
764    #[doc = "The notification id"]
765    #[serde(default, skip_serializing_if = "Option::is_none")]
766    pub id: Option<i32>,
767    #[doc = "Gets or sets date and time that this result was last modified."]
768    #[serde(
769        rename = "modifiedDate",
770        default,
771        skip_serializing_if = "Option::is_none",
772        with = "crate::date_time::rfc3339::option"
773    )]
774    pub modified_date: Option<time::OffsetDateTime>,
775    #[doc = "Result of the notification"]
776    #[serde(default, skip_serializing_if = "Option::is_none")]
777    pub result: Option<notification::Result>,
778    #[doc = "Status of the notification"]
779    #[serde(default, skip_serializing_if = "Option::is_none")]
780    pub status: Option<notification::Status>,
781    #[doc = "The subscriber Id  associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet."]
782    #[serde(
783        rename = "subscriberId",
784        default,
785        skip_serializing_if = "Option::is_none"
786    )]
787    pub subscriber_id: Option<String>,
788    #[doc = "The subscription id associated with this notification"]
789    #[serde(
790        rename = "subscriptionId",
791        default,
792        skip_serializing_if = "Option::is_none"
793    )]
794    pub subscription_id: Option<String>,
795}
796impl Notification {
797    pub fn new() -> Self {
798        Self::default()
799    }
800}
801pub mod notification {
802    use super::*;
803    #[doc = "Result of the notification"]
804    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
805    pub enum Result {
806        #[serde(rename = "pending")]
807        Pending,
808        #[serde(rename = "succeeded")]
809        Succeeded,
810        #[serde(rename = "failed")]
811        Failed,
812        #[serde(rename = "filtered")]
813        Filtered,
814    }
815    #[doc = "Status of the notification"]
816    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
817    pub enum Status {
818        #[serde(rename = "queued")]
819        Queued,
820        #[serde(rename = "processing")]
821        Processing,
822        #[serde(rename = "requestInProgress")]
823        RequestInProgress,
824        #[serde(rename = "completed")]
825        Completed,
826    }
827}
828#[doc = "Defines the data contract of notification details."]
829#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
830pub struct NotificationDetails {
831    #[doc = "Gets or sets the time that this notification was completed (response received from the consumer)"]
832    #[serde(
833        rename = "completedDate",
834        default,
835        skip_serializing_if = "Option::is_none",
836        with = "crate::date_time::rfc3339::option"
837    )]
838    pub completed_date: Option<time::OffsetDateTime>,
839    #[doc = "Gets or sets this notification detail's consumer action identifier."]
840    #[serde(
841        rename = "consumerActionId",
842        default,
843        skip_serializing_if = "Option::is_none"
844    )]
845    pub consumer_action_id: Option<String>,
846    #[doc = "Gets or sets this notification detail's consumer identifier."]
847    #[serde(
848        rename = "consumerId",
849        default,
850        skip_serializing_if = "Option::is_none"
851    )]
852    pub consumer_id: Option<String>,
853    #[doc = "Gets or sets this notification detail's consumer inputs."]
854    #[serde(
855        rename = "consumerInputs",
856        default,
857        skip_serializing_if = "Option::is_none"
858    )]
859    pub consumer_inputs: Option<serde_json::Value>,
860    #[doc = "Gets or sets the time that this notification was dequeued for processing"]
861    #[serde(
862        rename = "dequeuedDate",
863        default,
864        skip_serializing_if = "Option::is_none",
865        with = "crate::date_time::rfc3339::option"
866    )]
867    pub dequeued_date: Option<time::OffsetDateTime>,
868    #[doc = "Gets or sets this notification detail's error detail."]
869    #[serde(
870        rename = "errorDetail",
871        default,
872        skip_serializing_if = "Option::is_none"
873    )]
874    pub error_detail: Option<String>,
875    #[doc = "Gets or sets this notification detail's error message."]
876    #[serde(
877        rename = "errorMessage",
878        default,
879        skip_serializing_if = "Option::is_none"
880    )]
881    pub error_message: Option<String>,
882    #[doc = "Encapsulates the properties of an event."]
883    #[serde(default, skip_serializing_if = "Option::is_none")]
884    pub event: Option<Event>,
885    #[doc = "Gets or sets this notification detail's event type."]
886    #[serde(rename = "eventType", default, skip_serializing_if = "Option::is_none")]
887    pub event_type: Option<String>,
888    #[doc = "Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer)"]
889    #[serde(
890        rename = "processedDate",
891        default,
892        skip_serializing_if = "Option::is_none",
893        with = "crate::date_time::rfc3339::option"
894    )]
895    pub processed_date: Option<time::OffsetDateTime>,
896    #[doc = "Gets or sets this notification detail's publisher identifier."]
897    #[serde(
898        rename = "publisherId",
899        default,
900        skip_serializing_if = "Option::is_none"
901    )]
902    pub publisher_id: Option<String>,
903    #[doc = "Gets or sets this notification detail's publisher inputs."]
904    #[serde(
905        rename = "publisherInputs",
906        default,
907        skip_serializing_if = "Option::is_none"
908    )]
909    pub publisher_inputs: Option<serde_json::Value>,
910    #[doc = "Gets or sets the time that this notification was queued (created)"]
911    #[serde(
912        rename = "queuedDate",
913        default,
914        skip_serializing_if = "Option::is_none",
915        with = "crate::date_time::rfc3339::option"
916    )]
917    pub queued_date: Option<time::OffsetDateTime>,
918    #[doc = "Gets or sets this notification detail's request."]
919    #[serde(default, skip_serializing_if = "Option::is_none")]
920    pub request: Option<String>,
921    #[doc = "Number of requests attempted to be sent to the consumer"]
922    #[serde(
923        rename = "requestAttempts",
924        default,
925        skip_serializing_if = "Option::is_none"
926    )]
927    pub request_attempts: Option<i32>,
928    #[doc = "Duration of the request to the consumer in seconds"]
929    #[serde(
930        rename = "requestDuration",
931        default,
932        skip_serializing_if = "Option::is_none"
933    )]
934    pub request_duration: Option<f64>,
935    #[doc = "Gets or sets this notification detail's response."]
936    #[serde(default, skip_serializing_if = "Option::is_none")]
937    pub response: Option<String>,
938}
939impl NotificationDetails {
940    pub fn new() -> Self {
941        Self::default()
942    }
943}
944#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
945pub struct NotificationList {
946    #[serde(default, skip_serializing_if = "Option::is_none")]
947    pub count: Option<i32>,
948    #[serde(
949        default,
950        deserialize_with = "crate::serde::deserialize_null_as_default",
951        skip_serializing_if = "Vec::is_empty"
952    )]
953    pub value: Vec<Notification>,
954}
955impl NotificationList {
956    pub fn new() -> Self {
957        Self::default()
958    }
959}
960#[doc = "Summary of a particular result and count."]
961#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
962pub struct NotificationResultsSummaryDetail {
963    #[doc = "Count of notification sent out with a matching result."]
964    #[serde(
965        rename = "notificationCount",
966        default,
967        skip_serializing_if = "Option::is_none"
968    )]
969    pub notification_count: Option<i32>,
970    #[doc = "Result of the notification"]
971    #[serde(default, skip_serializing_if = "Option::is_none")]
972    pub result: Option<notification_results_summary_detail::Result>,
973}
974impl NotificationResultsSummaryDetail {
975    pub fn new() -> Self {
976        Self::default()
977    }
978}
979pub mod notification_results_summary_detail {
980    use super::*;
981    #[doc = "Result of the notification"]
982    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
983    pub enum Result {
984        #[serde(rename = "pending")]
985        Pending,
986        #[serde(rename = "succeeded")]
987        Succeeded,
988        #[serde(rename = "failed")]
989        Failed,
990        #[serde(rename = "filtered")]
991        Filtered,
992    }
993}
994#[doc = "Summary of the notifications for a subscription."]
995#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
996pub struct NotificationSummary {
997    #[doc = "The notification results for this particular subscription."]
998    #[serde(
999        default,
1000        deserialize_with = "crate::serde::deserialize_null_as_default",
1001        skip_serializing_if = "Vec::is_empty"
1002    )]
1003    pub results: Vec<NotificationResultsSummaryDetail>,
1004    #[doc = "The subscription id associated with this notification"]
1005    #[serde(
1006        rename = "subscriptionId",
1007        default,
1008        skip_serializing_if = "Option::is_none"
1009    )]
1010    pub subscription_id: Option<String>,
1011}
1012impl NotificationSummary {
1013    pub fn new() -> Self {
1014        Self::default()
1015    }
1016}
1017#[doc = "Defines a query for service hook notifications."]
1018#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1019pub struct NotificationsQuery {
1020    #[doc = "The subscriptions associated with the notifications returned from the query"]
1021    #[serde(
1022        rename = "associatedSubscriptions",
1023        default,
1024        deserialize_with = "crate::serde::deserialize_null_as_default",
1025        skip_serializing_if = "Vec::is_empty"
1026    )]
1027    pub associated_subscriptions: Vec<Subscription>,
1028    #[doc = "If true, we will return all notification history for the query provided; otherwise, the summary is returned."]
1029    #[serde(
1030        rename = "includeDetails",
1031        default,
1032        skip_serializing_if = "Option::is_none"
1033    )]
1034    pub include_details: Option<bool>,
1035    #[doc = "Optional maximum date at which the notification was created"]
1036    #[serde(
1037        rename = "maxCreatedDate",
1038        default,
1039        skip_serializing_if = "Option::is_none",
1040        with = "crate::date_time::rfc3339::option"
1041    )]
1042    pub max_created_date: Option<time::OffsetDateTime>,
1043    #[doc = "Optional maximum number of overall results to include"]
1044    #[serde(
1045        rename = "maxResults",
1046        default,
1047        skip_serializing_if = "Option::is_none"
1048    )]
1049    pub max_results: Option<i32>,
1050    #[doc = "Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query."]
1051    #[serde(
1052        rename = "maxResultsPerSubscription",
1053        default,
1054        skip_serializing_if = "Option::is_none"
1055    )]
1056    pub max_results_per_subscription: Option<i32>,
1057    #[doc = "Optional minimum date at which the notification was created"]
1058    #[serde(
1059        rename = "minCreatedDate",
1060        default,
1061        skip_serializing_if = "Option::is_none",
1062        with = "crate::date_time::rfc3339::option"
1063    )]
1064    pub min_created_date: Option<time::OffsetDateTime>,
1065    #[doc = "Optional publisher id to restrict the results to"]
1066    #[serde(
1067        rename = "publisherId",
1068        default,
1069        skip_serializing_if = "Option::is_none"
1070    )]
1071    pub publisher_id: Option<String>,
1072    #[doc = "Results from the query"]
1073    #[serde(
1074        default,
1075        deserialize_with = "crate::serde::deserialize_null_as_default",
1076        skip_serializing_if = "Vec::is_empty"
1077    )]
1078    pub results: Vec<Notification>,
1079    #[doc = "Optional notification result type to filter results to"]
1080    #[serde(
1081        rename = "resultType",
1082        default,
1083        skip_serializing_if = "Option::is_none"
1084    )]
1085    pub result_type: Option<notifications_query::ResultType>,
1086    #[doc = "Optional notification status to filter results to"]
1087    #[serde(default, skip_serializing_if = "Option::is_none")]
1088    pub status: Option<notifications_query::Status>,
1089    #[doc = "Optional list of subscription ids to restrict the results to"]
1090    #[serde(
1091        rename = "subscriptionIds",
1092        default,
1093        deserialize_with = "crate::serde::deserialize_null_as_default",
1094        skip_serializing_if = "Vec::is_empty"
1095    )]
1096    pub subscription_ids: Vec<String>,
1097    #[doc = "Summary of notifications - the count of each result type (success, fail, ..)."]
1098    #[serde(
1099        default,
1100        deserialize_with = "crate::serde::deserialize_null_as_default",
1101        skip_serializing_if = "Vec::is_empty"
1102    )]
1103    pub summary: Vec<NotificationSummary>,
1104}
1105impl NotificationsQuery {
1106    pub fn new() -> Self {
1107        Self::default()
1108    }
1109}
1110pub mod notifications_query {
1111    use super::*;
1112    #[doc = "Optional notification result type to filter results to"]
1113    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1114    pub enum ResultType {
1115        #[serde(rename = "pending")]
1116        Pending,
1117        #[serde(rename = "succeeded")]
1118        Succeeded,
1119        #[serde(rename = "failed")]
1120        Failed,
1121        #[serde(rename = "filtered")]
1122        Filtered,
1123    }
1124    #[doc = "Optional notification status to filter results to"]
1125    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1126    pub enum Status {
1127        #[serde(rename = "queued")]
1128        Queued,
1129        #[serde(rename = "processing")]
1130        Processing,
1131        #[serde(rename = "requestInProgress")]
1132        RequestInProgress,
1133        #[serde(rename = "completed")]
1134        Completed,
1135    }
1136}
1137#[doc = "Defines the data contract of an event publisher."]
1138#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1139pub struct Publisher {
1140    #[doc = "Links"]
1141    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1142    pub links: Option<serde_json::Value>,
1143    #[doc = "Gets this publisher's localized description."]
1144    #[serde(default, skip_serializing_if = "Option::is_none")]
1145    pub description: Option<String>,
1146    #[doc = "Gets this publisher's identifier."]
1147    #[serde(default, skip_serializing_if = "Option::is_none")]
1148    pub id: Option<String>,
1149    #[doc = "Publisher-specific inputs"]
1150    #[serde(
1151        rename = "inputDescriptors",
1152        default,
1153        deserialize_with = "crate::serde::deserialize_null_as_default",
1154        skip_serializing_if = "Vec::is_empty"
1155    )]
1156    pub input_descriptors: Vec<InputDescriptor>,
1157    #[doc = "Gets this publisher's localized name."]
1158    #[serde(default, skip_serializing_if = "Option::is_none")]
1159    pub name: Option<String>,
1160    #[doc = "The service instance type of the first party publisher."]
1161    #[serde(
1162        rename = "serviceInstanceType",
1163        default,
1164        skip_serializing_if = "Option::is_none"
1165    )]
1166    pub service_instance_type: Option<String>,
1167    #[doc = "Gets this publisher's supported event types."]
1168    #[serde(
1169        rename = "supportedEvents",
1170        default,
1171        deserialize_with = "crate::serde::deserialize_null_as_default",
1172        skip_serializing_if = "Vec::is_empty"
1173    )]
1174    pub supported_events: Vec<EventTypeDescriptor>,
1175    #[doc = "The url for this resource"]
1176    #[serde(default, skip_serializing_if = "Option::is_none")]
1177    pub url: Option<String>,
1178}
1179impl Publisher {
1180    pub fn new() -> Self {
1181        Self::default()
1182    }
1183}
1184#[doc = "Wrapper around an event which is being published"]
1185#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1186pub struct PublisherEvent {
1187    #[doc = "Add key/value pairs which will be stored with a published notification in the SH service DB.  This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notification."]
1188    #[serde(default, skip_serializing_if = "Option::is_none")]
1189    pub diagnostics: Option<serde_json::Value>,
1190    #[doc = "Encapsulates the properties of an event."]
1191    #[serde(default, skip_serializing_if = "Option::is_none")]
1192    pub event: Option<Event>,
1193    #[doc = "Gets or sets flag for filtered events"]
1194    #[serde(
1195        rename = "isFilteredEvent",
1196        default,
1197        skip_serializing_if = "Option::is_none"
1198    )]
1199    pub is_filtered_event: Option<bool>,
1200    #[doc = "Additional data that needs to be sent as part of notification to complement the Resource data in the Event"]
1201    #[serde(
1202        rename = "notificationData",
1203        default,
1204        skip_serializing_if = "Option::is_none"
1205    )]
1206    pub notification_data: Option<serde_json::Value>,
1207    #[doc = "Gets or sets the array of older supported resource versions."]
1208    #[serde(
1209        rename = "otherResourceVersions",
1210        default,
1211        deserialize_with = "crate::serde::deserialize_null_as_default",
1212        skip_serializing_if = "Vec::is_empty"
1213    )]
1214    pub other_resource_versions: Vec<VersionedResource>,
1215    #[doc = "Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event"]
1216    #[serde(
1217        rename = "publisherInputFilters",
1218        default,
1219        deserialize_with = "crate::serde::deserialize_null_as_default",
1220        skip_serializing_if = "Vec::is_empty"
1221    )]
1222    pub publisher_input_filters: Vec<InputFilter>,
1223    #[doc = "Encapsulates an event subscription."]
1224    #[serde(default, skip_serializing_if = "Option::is_none")]
1225    pub subscription: Option<Subscription>,
1226}
1227impl PublisherEvent {
1228    pub fn new() -> Self {
1229        Self::default()
1230    }
1231}
1232#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1233pub struct PublisherList {
1234    #[serde(default, skip_serializing_if = "Option::is_none")]
1235    pub count: Option<i32>,
1236    #[serde(
1237        default,
1238        deserialize_with = "crate::serde::deserialize_null_as_default",
1239        skip_serializing_if = "Vec::is_empty"
1240    )]
1241    pub value: Vec<Publisher>,
1242}
1243impl PublisherList {
1244    pub fn new() -> Self {
1245        Self::default()
1246    }
1247}
1248#[doc = "Defines a query for service hook publishers."]
1249#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1250pub struct PublishersQuery {
1251    #[doc = "Optional list of publisher ids to restrict the results to"]
1252    #[serde(
1253        rename = "publisherIds",
1254        default,
1255        deserialize_with = "crate::serde::deserialize_null_as_default",
1256        skip_serializing_if = "Vec::is_empty"
1257    )]
1258    pub publisher_ids: Vec<String>,
1259    #[doc = "Filter for publisher inputs"]
1260    #[serde(
1261        rename = "publisherInputs",
1262        default,
1263        skip_serializing_if = "Option::is_none"
1264    )]
1265    pub publisher_inputs: Option<serde_json::Value>,
1266    #[doc = "Results from the query"]
1267    #[serde(
1268        default,
1269        deserialize_with = "crate::serde::deserialize_null_as_default",
1270        skip_serializing_if = "Vec::is_empty"
1271    )]
1272    pub results: Vec<Publisher>,
1273}
1274impl PublishersQuery {
1275    pub fn new() -> Self {
1276        Self::default()
1277    }
1278}
1279#[doc = "The class to represent a collection of REST reference links."]
1280#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1281pub struct ReferenceLinks {
1282    #[doc = "The readonly view of the links.  Because Reference links are readonly, we only want to expose them as read only."]
1283    #[serde(default, skip_serializing_if = "Option::is_none")]
1284    pub links: Option<serde_json::Value>,
1285}
1286impl ReferenceLinks {
1287    pub fn new() -> Self {
1288        Self::default()
1289    }
1290}
1291#[doc = "The base class for all resource containers, i.e. Account, Collection, Project"]
1292#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1293pub struct ResourceContainer {
1294    #[doc = "Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deployment) containing the container resource."]
1295    #[serde(rename = "baseUrl", default, skip_serializing_if = "Option::is_none")]
1296    pub base_url: Option<String>,
1297    #[doc = "Gets or sets the container's specific Id."]
1298    #[serde(default, skip_serializing_if = "Option::is_none")]
1299    pub id: Option<String>,
1300    #[doc = "Gets or sets the container's name."]
1301    #[serde(default, skip_serializing_if = "Option::is_none")]
1302    pub name: Option<String>,
1303    #[doc = "Gets or sets the container's REST API URL."]
1304    #[serde(default, skip_serializing_if = "Option::is_none")]
1305    pub url: Option<String>,
1306}
1307impl ResourceContainer {
1308    pub fn new() -> Self {
1309        Self::default()
1310    }
1311}
1312#[doc = "Represents a session token to be attached in Events for Consumer actions that need it."]
1313#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1314pub struct SessionToken {
1315    #[doc = "The error message in case of error"]
1316    #[serde(default, skip_serializing_if = "Option::is_none")]
1317    pub error: Option<String>,
1318    #[doc = "The access token"]
1319    #[serde(default, skip_serializing_if = "Option::is_none")]
1320    pub token: Option<String>,
1321    #[doc = "The expiration date in UTC"]
1322    #[serde(
1323        rename = "validTo",
1324        default,
1325        skip_serializing_if = "Option::is_none",
1326        with = "crate::date_time::rfc3339::option"
1327    )]
1328    pub valid_to: Option<time::OffsetDateTime>,
1329}
1330impl SessionToken {
1331    pub fn new() -> Self {
1332        Self::default()
1333    }
1334}
1335#[doc = "Encapsulates an event subscription."]
1336#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1337pub struct Subscription {
1338    #[doc = "Links"]
1339    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1340    pub links: Option<serde_json::Value>,
1341    #[serde(
1342        rename = "actionDescription",
1343        default,
1344        skip_serializing_if = "Option::is_none"
1345    )]
1346    pub action_description: Option<String>,
1347    #[serde(
1348        rename = "consumerActionId",
1349        default,
1350        skip_serializing_if = "Option::is_none"
1351    )]
1352    pub consumer_action_id: Option<String>,
1353    #[serde(
1354        rename = "consumerId",
1355        default,
1356        skip_serializing_if = "Option::is_none"
1357    )]
1358    pub consumer_id: Option<String>,
1359    #[doc = "Consumer input values"]
1360    #[serde(
1361        rename = "consumerInputs",
1362        default,
1363        skip_serializing_if = "Option::is_none"
1364    )]
1365    pub consumer_inputs: Option<serde_json::Value>,
1366    #[serde(rename = "createdBy", default, skip_serializing_if = "Option::is_none")]
1367    pub created_by: Option<IdentityRef>,
1368    #[serde(
1369        rename = "createdDate",
1370        default,
1371        skip_serializing_if = "Option::is_none",
1372        with = "crate::date_time::rfc3339::option"
1373    )]
1374    pub created_date: Option<time::OffsetDateTime>,
1375    #[serde(
1376        rename = "eventDescription",
1377        default,
1378        skip_serializing_if = "Option::is_none"
1379    )]
1380    pub event_description: Option<String>,
1381    #[serde(rename = "eventType", default, skip_serializing_if = "Option::is_none")]
1382    pub event_type: Option<String>,
1383    #[serde(default, skip_serializing_if = "Option::is_none")]
1384    pub id: Option<String>,
1385    #[serde(
1386        rename = "lastProbationRetryDate",
1387        default,
1388        skip_serializing_if = "Option::is_none",
1389        with = "crate::date_time::rfc3339::option"
1390    )]
1391    pub last_probation_retry_date: Option<time::OffsetDateTime>,
1392    #[serde(
1393        rename = "modifiedBy",
1394        default,
1395        skip_serializing_if = "Option::is_none"
1396    )]
1397    pub modified_by: Option<IdentityRef>,
1398    #[serde(
1399        rename = "modifiedDate",
1400        default,
1401        skip_serializing_if = "Option::is_none",
1402        with = "crate::date_time::rfc3339::option"
1403    )]
1404    pub modified_date: Option<time::OffsetDateTime>,
1405    #[serde(
1406        rename = "probationRetries",
1407        default,
1408        skip_serializing_if = "Option::is_none"
1409    )]
1410    pub probation_retries: Option<i32>,
1411    #[serde(
1412        rename = "publisherId",
1413        default,
1414        skip_serializing_if = "Option::is_none"
1415    )]
1416    pub publisher_id: Option<String>,
1417    #[doc = "Publisher input values"]
1418    #[serde(
1419        rename = "publisherInputs",
1420        default,
1421        skip_serializing_if = "Option::is_none"
1422    )]
1423    pub publisher_inputs: Option<serde_json::Value>,
1424    #[serde(
1425        rename = "resourceVersion",
1426        default,
1427        skip_serializing_if = "Option::is_none"
1428    )]
1429    pub resource_version: Option<String>,
1430    #[serde(default, skip_serializing_if = "Option::is_none")]
1431    pub status: Option<subscription::Status>,
1432    #[serde(default, skip_serializing_if = "Option::is_none")]
1433    pub subscriber: Option<IdentityRef>,
1434    #[serde(default, skip_serializing_if = "Option::is_none")]
1435    pub url: Option<String>,
1436}
1437impl Subscription {
1438    pub fn new() -> Self {
1439        Self::default()
1440    }
1441}
1442pub mod subscription {
1443    use super::*;
1444    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1445    pub enum Status {
1446        #[serde(rename = "enabled")]
1447        Enabled,
1448        #[serde(rename = "onProbation")]
1449        OnProbation,
1450        #[serde(rename = "disabledByUser")]
1451        DisabledByUser,
1452        #[serde(rename = "disabledBySystem")]
1453        DisabledBySystem,
1454        #[serde(rename = "disabledByInactiveIdentity")]
1455        DisabledByInactiveIdentity,
1456    }
1457}
1458#[doc = "Contains all the diagnostics settings for a subscription."]
1459#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1460pub struct SubscriptionDiagnostics {
1461    #[doc = "Data controlling a single diagnostic setting for a subscription."]
1462    #[serde(
1463        rename = "deliveryResults",
1464        default,
1465        skip_serializing_if = "Option::is_none"
1466    )]
1467    pub delivery_results: Option<SubscriptionTracing>,
1468    #[doc = "Data controlling a single diagnostic setting for a subscription."]
1469    #[serde(
1470        rename = "deliveryTracing",
1471        default,
1472        skip_serializing_if = "Option::is_none"
1473    )]
1474    pub delivery_tracing: Option<SubscriptionTracing>,
1475    #[doc = "Data controlling a single diagnostic setting for a subscription."]
1476    #[serde(
1477        rename = "evaluationTracing",
1478        default,
1479        skip_serializing_if = "Option::is_none"
1480    )]
1481    pub evaluation_tracing: Option<SubscriptionTracing>,
1482}
1483impl SubscriptionDiagnostics {
1484    pub fn new() -> Self {
1485        Self::default()
1486    }
1487}
1488#[doc = "Query for obtaining information about the possible/allowed values for one or more subscription inputs"]
1489#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1490pub struct SubscriptionInputValuesQuery {
1491    #[doc = "The input values to return on input, and the result from the consumer on output."]
1492    #[serde(
1493        rename = "inputValues",
1494        default,
1495        deserialize_with = "crate::serde::deserialize_null_as_default",
1496        skip_serializing_if = "Vec::is_empty"
1497    )]
1498    pub input_values: Vec<InputValues>,
1499    #[doc = "The scope at which the properties to query belong"]
1500    #[serde(default, skip_serializing_if = "Option::is_none")]
1501    pub scope: Option<subscription_input_values_query::Scope>,
1502    #[doc = "Encapsulates an event subscription."]
1503    #[serde(default, skip_serializing_if = "Option::is_none")]
1504    pub subscription: Option<Subscription>,
1505}
1506impl SubscriptionInputValuesQuery {
1507    pub fn new() -> Self {
1508        Self::default()
1509    }
1510}
1511pub mod subscription_input_values_query {
1512    use super::*;
1513    #[doc = "The scope at which the properties to query belong"]
1514    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1515    pub enum Scope {
1516        #[serde(rename = "publisher")]
1517        Publisher,
1518        #[serde(rename = "consumer")]
1519        Consumer,
1520    }
1521}
1522#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1523pub struct SubscriptionList {
1524    #[serde(default, skip_serializing_if = "Option::is_none")]
1525    pub count: Option<i32>,
1526    #[serde(
1527        default,
1528        deserialize_with = "crate::serde::deserialize_null_as_default",
1529        skip_serializing_if = "Vec::is_empty"
1530    )]
1531    pub value: Vec<Subscription>,
1532}
1533impl SubscriptionList {
1534    pub fn new() -> Self {
1535        Self::default()
1536    }
1537}
1538#[doc = "Data controlling a single diagnostic setting for a subscription."]
1539#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1540pub struct SubscriptionTracing {
1541    #[doc = "Indicates whether the diagnostic tracing is enabled or not."]
1542    #[serde(default, skip_serializing_if = "Option::is_none")]
1543    pub enabled: Option<bool>,
1544    #[doc = "Trace until the specified end date."]
1545    #[serde(
1546        rename = "endDate",
1547        default,
1548        skip_serializing_if = "Option::is_none",
1549        with = "crate::date_time::rfc3339::option"
1550    )]
1551    pub end_date: Option<time::OffsetDateTime>,
1552    #[doc = "The maximum number of result details to trace."]
1553    #[serde(
1554        rename = "maxTracedEntries",
1555        default,
1556        skip_serializing_if = "Option::is_none"
1557    )]
1558    pub max_traced_entries: Option<i32>,
1559    #[doc = "The date and time tracing started."]
1560    #[serde(
1561        rename = "startDate",
1562        default,
1563        skip_serializing_if = "Option::is_none",
1564        with = "crate::date_time::rfc3339::option"
1565    )]
1566    pub start_date: Option<time::OffsetDateTime>,
1567    #[doc = "Trace until remaining count reaches 0."]
1568    #[serde(
1569        rename = "tracedEntries",
1570        default,
1571        skip_serializing_if = "Option::is_none"
1572    )]
1573    pub traced_entries: Option<i32>,
1574}
1575impl SubscriptionTracing {
1576    pub fn new() -> Self {
1577        Self::default()
1578    }
1579}
1580#[doc = "Defines a query for service hook subscriptions."]
1581#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1582pub struct SubscriptionsQuery {
1583    #[doc = "Optional consumer action id to restrict the results to (null for any)"]
1584    #[serde(
1585        rename = "consumerActionId",
1586        default,
1587        skip_serializing_if = "Option::is_none"
1588    )]
1589    pub consumer_action_id: Option<String>,
1590    #[doc = "Optional consumer id to restrict the results to (null for any)"]
1591    #[serde(
1592        rename = "consumerId",
1593        default,
1594        skip_serializing_if = "Option::is_none"
1595    )]
1596    pub consumer_id: Option<String>,
1597    #[doc = "Filter for subscription consumer inputs"]
1598    #[serde(
1599        rename = "consumerInputFilters",
1600        default,
1601        deserialize_with = "crate::serde::deserialize_null_as_default",
1602        skip_serializing_if = "Vec::is_empty"
1603    )]
1604    pub consumer_input_filters: Vec<InputFilter>,
1605    #[doc = "Optional event type id to restrict the results to (null for any)"]
1606    #[serde(rename = "eventType", default, skip_serializing_if = "Option::is_none")]
1607    pub event_type: Option<String>,
1608    #[doc = "Optional publisher id to restrict the results to (null for any)"]
1609    #[serde(
1610        rename = "publisherId",
1611        default,
1612        skip_serializing_if = "Option::is_none"
1613    )]
1614    pub publisher_id: Option<String>,
1615    #[doc = "Filter for subscription publisher inputs"]
1616    #[serde(
1617        rename = "publisherInputFilters",
1618        default,
1619        deserialize_with = "crate::serde::deserialize_null_as_default",
1620        skip_serializing_if = "Vec::is_empty"
1621    )]
1622    pub publisher_input_filters: Vec<InputFilter>,
1623    #[doc = "Results from the query"]
1624    #[serde(
1625        default,
1626        deserialize_with = "crate::serde::deserialize_null_as_default",
1627        skip_serializing_if = "Vec::is_empty"
1628    )]
1629    pub results: Vec<Subscription>,
1630    #[doc = "Optional subscriber filter."]
1631    #[serde(
1632        rename = "subscriberId",
1633        default,
1634        skip_serializing_if = "Option::is_none"
1635    )]
1636    pub subscriber_id: Option<String>,
1637}
1638impl SubscriptionsQuery {
1639    pub fn new() -> Self {
1640        Self::default()
1641    }
1642}
1643#[doc = "Parameters to update diagnostics settings for a subscription."]
1644#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1645pub struct UpdateSubscripitonDiagnosticsParameters {
1646    #[doc = "Parameters to update a specific diagnostic setting."]
1647    #[serde(
1648        rename = "deliveryResults",
1649        default,
1650        skip_serializing_if = "Option::is_none"
1651    )]
1652    pub delivery_results: Option<UpdateSubscripitonTracingParameters>,
1653    #[doc = "Parameters to update a specific diagnostic setting."]
1654    #[serde(
1655        rename = "deliveryTracing",
1656        default,
1657        skip_serializing_if = "Option::is_none"
1658    )]
1659    pub delivery_tracing: Option<UpdateSubscripitonTracingParameters>,
1660    #[doc = "Parameters to update a specific diagnostic setting."]
1661    #[serde(
1662        rename = "evaluationTracing",
1663        default,
1664        skip_serializing_if = "Option::is_none"
1665    )]
1666    pub evaluation_tracing: Option<UpdateSubscripitonTracingParameters>,
1667}
1668impl UpdateSubscripitonDiagnosticsParameters {
1669    pub fn new() -> Self {
1670        Self::default()
1671    }
1672}
1673#[doc = "Parameters to update a specific diagnostic setting."]
1674#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1675pub struct UpdateSubscripitonTracingParameters {
1676    #[doc = "Indicates whether to enable to disable the diagnostic tracing."]
1677    #[serde(default, skip_serializing_if = "Option::is_none")]
1678    pub enabled: Option<bool>,
1679}
1680impl UpdateSubscripitonTracingParameters {
1681    pub fn new() -> Self {
1682        Self::default()
1683    }
1684}
1685#[doc = "Encapsulates the resource version and its data or reference to the compatible version. Only one of the two last fields should be not null."]
1686#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1687pub struct VersionedResource {
1688    #[doc = "Gets or sets the reference to the compatible version."]
1689    #[serde(
1690        rename = "compatibleWith",
1691        default,
1692        skip_serializing_if = "Option::is_none"
1693    )]
1694    pub compatible_with: Option<String>,
1695    #[doc = "Gets or sets the resource data."]
1696    #[serde(default, skip_serializing_if = "Option::is_none")]
1697    pub resource: Option<serde_json::Value>,
1698    #[doc = "Gets or sets the version of the resource data."]
1699    #[serde(
1700        rename = "resourceVersion",
1701        default,
1702        skip_serializing_if = "Option::is_none"
1703    )]
1704    pub resource_version: Option<String>,
1705}
1706impl VersionedResource {
1707    pub fn new() -> Self {
1708        Self::default()
1709    }
1710}
1711#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
1712#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1713pub struct VssJsonCollectionWrapper {
1714    #[serde(flatten)]
1715    pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
1716    #[doc = "The serialized item."]
1717    #[serde(default, skip_serializing_if = "Option::is_none")]
1718    pub value: Option<String>,
1719}
1720impl VssJsonCollectionWrapper {
1721    pub fn new() -> Self {
1722        Self::default()
1723    }
1724}
1725#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1726pub struct VssJsonCollectionWrapperBase {
1727    #[doc = "The number of serialized items."]
1728    #[serde(default, skip_serializing_if = "Option::is_none")]
1729    pub count: Option<i32>,
1730}
1731impl VssJsonCollectionWrapperBase {
1732    pub fn new() -> Self {
1733        Self::default()
1734    }
1735}