redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use crate::models;

/// The EventService schema contains properties for managing event subscriptions and generates the events sent to subscribers.  The resource has links to the actual collection of subscriptions, which are called event destinations.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct EventService {
    #[serde(rename = "@odata.context")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_context: Option<models::odata_v4::Context>,
    #[serde(rename = "@odata.etag")]
    #[serde(skip_deserializing)]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub odata_etag: Option<models::odata_v4::Etag>,
    #[serde(rename = "@odata.id")]
    #[serde(skip_deserializing)]
    pub odata_id: models::odata_v4::Id,
    #[serde(rename = "@odata.type")]
    #[serde(skip_deserializing)]
    #[derivative(Default(value = "models::odata_v4::Type(\"#EventService.v1_10_0.EventService\".to_string())"))]
    pub odata_type: models::odata_v4::Type,
    #[serde(rename = "Actions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub actions: Option<models::event_service::v1_10_0::Actions>,
    /// The number of times that the POST of an event is retried before the subscription terminates.  This retry occurs at the service level, which means that the HTTP POST to the event destination fails with an HTTP `4XX` or `5XX` status code or an HTTP timeout occurs this many times before the event destination subscription terminates.
    #[serde(rename = "DeliveryRetryAttempts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub delivery_retry_attempts: Option<i64>,
    /// The interval, in seconds, between retry attempts for sending any event.
    #[serde(rename = "DeliveryRetryIntervalSeconds")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub delivery_retry_interval_seconds: Option<i64>,
    #[serde(rename = "Description")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<models::resource::Description>,
    /// The content types of the message that this service can send to the event destination.
    #[serde(rename = "EventFormatTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub event_format_types: Option<Vec<models::event_destination::EventFormatType>>,
    /// The types of events to which a client can subscribe.
    #[serde(rename = "EventTypesForSubscription")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub event_types_for_subscription: Option<Vec<models::event::EventType>>,
    /// An indication of whether the service supports filtering by the ExcludeMessageIds property.
    #[serde(rename = "ExcludeMessageId")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exclude_message_id: Option<bool>,
    /// An indication of whether the service supports filtering by the ExcludeRegistryPrefixes property.
    #[serde(rename = "ExcludeRegistryPrefix")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub exclude_registry_prefix: Option<bool>,
    #[serde(rename = "Id")]
    #[serde(skip_deserializing)]
    pub id: models::resource::Id,
    /// An indication of whether the service supports including the resource payload of the origin of condition in the event payload.
    #[serde(rename = "IncludeOriginOfConditionSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub include_origin_of_condition_supported: Option<bool>,
    #[serde(rename = "Name")]
    #[serde(skip_deserializing)]
    pub name: models::resource::Name,
    #[serde(rename = "Oem")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub oem: Option<models::resource::Oem>,
    /// The list of the prefixes of the message registries that can be used for the RegistryPrefixes or ExcludeRegistryPrefixes properties on a subscription.  If this property is absent or contains an empty array, the service does not support RegistryPrefix-based subscriptions.
    #[serde(rename = "RegistryPrefixes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub registry_prefixes: Option<Vec<String>>,
    /// The list of @odata.type values, or schema names, that can be specified in the ResourceTypes array in a subscription.  If this property is absent or contains an empty array, the service does not support resource type-based subscriptions.
    #[serde(rename = "ResourceTypes")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resource_types: Option<Vec<String>>,
    #[serde(rename = "SMTP")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub smtp: Option<models::event_service::v1_10_0::SMTP>,
    #[serde(rename = "SSEFilterPropertiesSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub sse_filter_properties_supported: Option<models::event_service::v1_10_0::SSEFilterPropertiesSupported>,
    /// The link to a URI for receiving Server-Sent Event representations for the events that this service generates.
    #[serde(rename = "ServerSentEventUri")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub server_sent_event_uri: Option<String>,
    /// An indication of whether this service is enabled.  If `false`, events are no longer published, new SSE connections cannot be established, and existing SSE connections are terminated.
    #[serde(rename = "ServiceEnabled")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub service_enabled: Option<bool>,
    /// The list of severities that can be specified in the Severities array in a subscription.
    #[serde(rename = "Severities")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub severities: Option<Vec<models::resource::Health>>,
    #[serde(rename = "Status")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<models::resource::Status>,
    /// An indication of whether the service supports the SubordinateResources property on both event subscriptions and generated events.
    #[serde(rename = "SubordinateResourcesSupported")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subordinate_resources_supported: Option<bool>,
    #[serde(rename = "Subscriptions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub subscriptions: Option<models::odata_v4::IdRef>,
}

impl crate::Metadata<'static> for EventService {
    const JSON_SCHEMA: &'static str = "EventService.v1_10_0.json";
}