1#![allow(non_camel_case_types)]
2#![allow(unused_imports)]
3use serde::de::{value, Deserializer, IntoDeserializer};
4use serde::{Deserialize, Serialize, Serializer};
5use std::str::FromStr;
6#[doc = "Information about an asset associated with the web service."]
7#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
8pub struct AssetItem {
9 #[doc = "Asset's friendly name."]
10 pub name: String,
11 #[doc = "Asset's Id."]
12 #[serde(default, skip_serializing_if = "Option::is_none")]
13 pub id: Option<String>,
14 #[doc = "Asset's type."]
15 #[serde(rename = "type")]
16 pub type_: asset_item::Type,
17 #[doc = "Describes the access location for a blob."]
18 #[serde(rename = "locationInfo")]
19 pub location_info: BlobLocation,
20 #[doc = "Information about the asset's input ports."]
21 #[serde(rename = "inputPorts", default, skip_serializing_if = "Option::is_none")]
22 pub input_ports: Option<serde_json::Value>,
23 #[doc = "Information about the asset's output ports."]
24 #[serde(rename = "outputPorts", default, skip_serializing_if = "Option::is_none")]
25 pub output_ports: Option<serde_json::Value>,
26 #[doc = "If the asset is a custom module, this holds the module's metadata."]
27 #[serde(default, skip_serializing_if = "Option::is_none")]
28 pub metadata: Option<serde_json::Value>,
29 #[doc = "If the asset is a custom module, this holds the module's parameters."]
30 #[serde(
31 default,
32 deserialize_with = "azure_core::util::deserialize_null_as_default",
33 skip_serializing_if = "Vec::is_empty"
34 )]
35 pub parameters: Vec<ModuleAssetParameter>,
36}
37impl AssetItem {
38 pub fn new(name: String, type_: asset_item::Type, location_info: BlobLocation) -> Self {
39 Self {
40 name,
41 id: None,
42 type_,
43 location_info,
44 input_ports: None,
45 output_ports: None,
46 metadata: None,
47 parameters: Vec::new(),
48 }
49 }
50}
51pub mod asset_item {
52 use super::*;
53 #[doc = "Asset's type."]
54 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
55 #[serde(remote = "Type")]
56 pub enum Type {
57 Module,
58 Resource,
59 #[serde(skip_deserializing)]
60 UnknownValue(String),
61 }
62 impl FromStr for Type {
63 type Err = value::Error;
64 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
65 Self::deserialize(s.into_deserializer())
66 }
67 }
68 impl<'de> Deserialize<'de> for Type {
69 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
70 where
71 D: Deserializer<'de>,
72 {
73 let s = String::deserialize(deserializer)?;
74 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
75 Ok(deserialized)
76 }
77 }
78 impl Serialize for Type {
79 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
80 where
81 S: Serializer,
82 {
83 match self {
84 Self::Module => serializer.serialize_unit_variant("Type", 0u32, "Module"),
85 Self::Resource => serializer.serialize_unit_variant("Type", 1u32, "Resource"),
86 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
87 }
88 }
89 }
90}
91#[doc = "The error detail information for async operation"]
92#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
93pub struct AsyncOperationErrorInfo {
94 #[doc = "The error code."]
95 #[serde(default, skip_serializing_if = "Option::is_none")]
96 pub code: Option<String>,
97 #[doc = "The error target."]
98 #[serde(default, skip_serializing_if = "Option::is_none")]
99 pub target: Option<String>,
100 #[doc = "The error message."]
101 #[serde(default, skip_serializing_if = "Option::is_none")]
102 pub message: Option<String>,
103 #[doc = "An array containing error information."]
104 #[serde(
105 default,
106 deserialize_with = "azure_core::util::deserialize_null_as_default",
107 skip_serializing_if = "Vec::is_empty"
108 )]
109 pub details: Vec<AsyncOperationErrorInfo>,
110}
111impl AsyncOperationErrorInfo {
112 pub fn new() -> Self {
113 Self::default()
114 }
115}
116#[doc = "Azure async operation status."]
117#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
118pub struct AsyncOperationStatus {
119 #[doc = "Async operation id."]
120 #[serde(default, skip_serializing_if = "Option::is_none")]
121 pub id: Option<String>,
122 #[doc = "Async operation name."]
123 #[serde(default, skip_serializing_if = "Option::is_none")]
124 pub name: Option<String>,
125 #[doc = "Read Only: The provisioning state of the web service. Valid values are Unknown, Provisioning, Succeeded, and Failed."]
126 #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
127 pub provisioning_state: Option<async_operation_status::ProvisioningState>,
128 #[doc = "The date time that the async operation started."]
129 #[serde(rename = "startTime", default, with = "azure_core::date::rfc3339::option")]
130 pub start_time: Option<::time::OffsetDateTime>,
131 #[doc = "The date time that the async operation finished."]
132 #[serde(rename = "endTime", default, with = "azure_core::date::rfc3339::option")]
133 pub end_time: Option<::time::OffsetDateTime>,
134 #[doc = "Async operation progress."]
135 #[serde(rename = "percentComplete", default, skip_serializing_if = "Option::is_none")]
136 pub percent_complete: Option<f64>,
137 #[doc = "The error detail information for async operation"]
138 #[serde(rename = "errorInfo", default, skip_serializing_if = "Option::is_none")]
139 pub error_info: Option<AsyncOperationErrorInfo>,
140}
141impl AsyncOperationStatus {
142 pub fn new() -> Self {
143 Self::default()
144 }
145}
146pub mod async_operation_status {
147 use super::*;
148 #[doc = "Read Only: The provisioning state of the web service. Valid values are Unknown, Provisioning, Succeeded, and Failed."]
149 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
150 #[serde(remote = "ProvisioningState")]
151 pub enum ProvisioningState {
152 Unknown,
153 Provisioning,
154 Succeeded,
155 Failed,
156 #[serde(skip_deserializing)]
157 UnknownValue(String),
158 }
159 impl FromStr for ProvisioningState {
160 type Err = value::Error;
161 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
162 Self::deserialize(s.into_deserializer())
163 }
164 }
165 impl<'de> Deserialize<'de> for ProvisioningState {
166 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
167 where
168 D: Deserializer<'de>,
169 {
170 let s = String::deserialize(deserializer)?;
171 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
172 Ok(deserialized)
173 }
174 }
175 impl Serialize for ProvisioningState {
176 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
177 where
178 S: Serializer,
179 {
180 match self {
181 Self::Unknown => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Unknown"),
182 Self::Provisioning => serializer.serialize_unit_variant("ProvisioningState", 1u32, "Provisioning"),
183 Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
184 Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
185 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
186 }
187 }
188 }
189}
190#[doc = "Describes the access location for a blob."]
191#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
192pub struct BlobLocation {
193 #[doc = "The URI from which the blob is accessible from. For example, aml://abc for system assets or https://xyz for user assets or payload."]
194 pub uri: String,
195 #[doc = "Access credentials for the blob, if applicable (e.g. blob specified by storage account connection string + blob URI)"]
196 #[serde(default, skip_serializing_if = "Option::is_none")]
197 pub credentials: Option<String>,
198}
199impl BlobLocation {
200 pub fn new(uri: String) -> Self {
201 Self { uri, credentials: None }
202 }
203}
204#[doc = "Swagger 2.0 schema for a column within the data table representing a web service input or output. See Swagger specification: http://swagger.io/specification/"]
205#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
206pub struct ColumnSpecification {
207 #[doc = "Data type of the column."]
208 #[serde(rename = "type")]
209 pub type_: column_specification::Type,
210 #[doc = "Additional format information for the data type."]
211 #[serde(default, skip_serializing_if = "Option::is_none")]
212 pub format: Option<column_specification::Format>,
213 #[doc = "If the data type is categorical, this provides the list of accepted categories."]
214 #[serde(
215 rename = "enum",
216 default,
217 deserialize_with = "azure_core::util::deserialize_null_as_default",
218 skip_serializing_if = "Vec::is_empty"
219 )]
220 pub enum_: Vec<serde_json::Value>,
221 #[doc = "Flag indicating if the type supports null values or not."]
222 #[serde(rename = "x-ms-isnullable", default, skip_serializing_if = "Option::is_none")]
223 pub x_ms_isnullable: Option<bool>,
224 #[doc = "Flag indicating whether the categories are treated as an ordered set or not, if this is a categorical column."]
225 #[serde(rename = "x-ms-isordered", default, skip_serializing_if = "Option::is_none")]
226 pub x_ms_isordered: Option<bool>,
227}
228impl ColumnSpecification {
229 pub fn new(type_: column_specification::Type) -> Self {
230 Self {
231 type_,
232 format: None,
233 enum_: Vec::new(),
234 x_ms_isnullable: None,
235 x_ms_isordered: None,
236 }
237 }
238}
239pub mod column_specification {
240 use super::*;
241 #[doc = "Data type of the column."]
242 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
243 #[serde(remote = "Type")]
244 pub enum Type {
245 Boolean,
246 Integer,
247 Number,
248 String,
249 #[serde(skip_deserializing)]
250 UnknownValue(String),
251 }
252 impl FromStr for Type {
253 type Err = value::Error;
254 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
255 Self::deserialize(s.into_deserializer())
256 }
257 }
258 impl<'de> Deserialize<'de> for Type {
259 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
260 where
261 D: Deserializer<'de>,
262 {
263 let s = String::deserialize(deserializer)?;
264 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
265 Ok(deserialized)
266 }
267 }
268 impl Serialize for Type {
269 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
270 where
271 S: Serializer,
272 {
273 match self {
274 Self::Boolean => serializer.serialize_unit_variant("Type", 0u32, "Boolean"),
275 Self::Integer => serializer.serialize_unit_variant("Type", 1u32, "Integer"),
276 Self::Number => serializer.serialize_unit_variant("Type", 2u32, "Number"),
277 Self::String => serializer.serialize_unit_variant("Type", 3u32, "String"),
278 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
279 }
280 }
281 }
282 #[doc = "Additional format information for the data type."]
283 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
284 #[serde(remote = "Format")]
285 pub enum Format {
286 Byte,
287 Char,
288 Complex64,
289 Complex128,
290 #[serde(rename = "Date-time")]
291 DateTime,
292 #[serde(rename = "Date-timeOffset")]
293 DateTimeOffset,
294 Double,
295 Duration,
296 Float,
297 Int8,
298 Int16,
299 Int32,
300 Int64,
301 Uint8,
302 Uint16,
303 Uint32,
304 Uint64,
305 #[serde(skip_deserializing)]
306 UnknownValue(String),
307 }
308 impl FromStr for Format {
309 type Err = value::Error;
310 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
311 Self::deserialize(s.into_deserializer())
312 }
313 }
314 impl<'de> Deserialize<'de> for Format {
315 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
316 where
317 D: Deserializer<'de>,
318 {
319 let s = String::deserialize(deserializer)?;
320 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
321 Ok(deserialized)
322 }
323 }
324 impl Serialize for Format {
325 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
326 where
327 S: Serializer,
328 {
329 match self {
330 Self::Byte => serializer.serialize_unit_variant("Format", 0u32, "Byte"),
331 Self::Char => serializer.serialize_unit_variant("Format", 1u32, "Char"),
332 Self::Complex64 => serializer.serialize_unit_variant("Format", 2u32, "Complex64"),
333 Self::Complex128 => serializer.serialize_unit_variant("Format", 3u32, "Complex128"),
334 Self::DateTime => serializer.serialize_unit_variant("Format", 4u32, "Date-time"),
335 Self::DateTimeOffset => serializer.serialize_unit_variant("Format", 5u32, "Date-timeOffset"),
336 Self::Double => serializer.serialize_unit_variant("Format", 6u32, "Double"),
337 Self::Duration => serializer.serialize_unit_variant("Format", 7u32, "Duration"),
338 Self::Float => serializer.serialize_unit_variant("Format", 8u32, "Float"),
339 Self::Int8 => serializer.serialize_unit_variant("Format", 9u32, "Int8"),
340 Self::Int16 => serializer.serialize_unit_variant("Format", 10u32, "Int16"),
341 Self::Int32 => serializer.serialize_unit_variant("Format", 11u32, "Int32"),
342 Self::Int64 => serializer.serialize_unit_variant("Format", 12u32, "Int64"),
343 Self::Uint8 => serializer.serialize_unit_variant("Format", 13u32, "Uint8"),
344 Self::Uint16 => serializer.serialize_unit_variant("Format", 14u32, "Uint16"),
345 Self::Uint32 => serializer.serialize_unit_variant("Format", 15u32, "Uint32"),
346 Self::Uint64 => serializer.serialize_unit_variant("Format", 16u32, "Uint64"),
347 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
348 }
349 }
350 }
351}
352#[doc = "Information about the machine learning commitment plan associated with the web service."]
353#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
354pub struct CommitmentPlan {
355 #[doc = "Specifies the Azure Resource Manager ID of the commitment plan associated with the web service."]
356 pub id: String,
357}
358impl CommitmentPlan {
359 pub fn new(id: String) -> Self {
360 Self { id }
361 }
362}
363#[doc = "Diagnostics settings for an Azure ML web service."]
364#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
365pub struct DiagnosticsConfiguration {
366 #[doc = "Specifies the verbosity of the diagnostic output. Valid values are: None - disables tracing; Error - collects only error (stderr) traces; All - collects all traces (stdout and stderr)."]
367 pub level: diagnostics_configuration::Level,
368 #[doc = "Specifies the date and time when the logging will cease. If null, diagnostic collection is not time limited."]
369 #[serde(default, with = "azure_core::date::rfc3339::option")]
370 pub expiry: Option<::time::OffsetDateTime>,
371}
372impl DiagnosticsConfiguration {
373 pub fn new(level: diagnostics_configuration::Level) -> Self {
374 Self { level, expiry: None }
375 }
376}
377pub mod diagnostics_configuration {
378 use super::*;
379 #[doc = "Specifies the verbosity of the diagnostic output. Valid values are: None - disables tracing; Error - collects only error (stderr) traces; All - collects all traces (stdout and stderr)."]
380 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
381 #[serde(remote = "Level")]
382 pub enum Level {
383 None,
384 Error,
385 All,
386 #[serde(skip_deserializing)]
387 UnknownValue(String),
388 }
389 impl FromStr for Level {
390 type Err = value::Error;
391 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
392 Self::deserialize(s.into_deserializer())
393 }
394 }
395 impl<'de> Deserialize<'de> for Level {
396 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
397 where
398 D: Deserializer<'de>,
399 {
400 let s = String::deserialize(deserializer)?;
401 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
402 Ok(deserialized)
403 }
404 }
405 impl Serialize for Level {
406 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
407 where
408 S: Serializer,
409 {
410 match self {
411 Self::None => serializer.serialize_unit_variant("Level", 0u32, "None"),
412 Self::Error => serializer.serialize_unit_variant("Level", 1u32, "Error"),
413 Self::All => serializer.serialize_unit_variant("Level", 2u32, "All"),
414 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
415 }
416 }
417 }
418}
419#[doc = "Sample input data for the service's input(s)."]
420#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
421pub struct ExampleRequest {
422 #[doc = "Sample input data for the web service's input(s) given as an input name to sample input values matrix map."]
423 #[serde(default, skip_serializing_if = "Option::is_none")]
424 pub inputs: Option<serde_json::Value>,
425 #[doc = "Sample input data for the web service's global parameters"]
426 #[serde(rename = "globalParameters", default, skip_serializing_if = "Option::is_none")]
427 pub global_parameters: Option<serde_json::Value>,
428}
429impl ExampleRequest {
430 pub fn new() -> Self {
431 Self::default()
432 }
433}
434#[doc = "Defines an edge within the web service's graph."]
435#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
436pub struct GraphEdge {
437 #[doc = "The source graph node's identifier."]
438 #[serde(rename = "sourceNodeId", default, skip_serializing_if = "Option::is_none")]
439 pub source_node_id: Option<String>,
440 #[doc = "The identifier of the source node's port that the edge connects from."]
441 #[serde(rename = "sourcePortId", default, skip_serializing_if = "Option::is_none")]
442 pub source_port_id: Option<String>,
443 #[doc = "The destination graph node's identifier."]
444 #[serde(rename = "targetNodeId", default, skip_serializing_if = "Option::is_none")]
445 pub target_node_id: Option<String>,
446 #[doc = "The identifier of the destination node's port that the edge connects into."]
447 #[serde(rename = "targetPortId", default, skip_serializing_if = "Option::is_none")]
448 pub target_port_id: Option<String>,
449}
450impl GraphEdge {
451 pub fn new() -> Self {
452 Self::default()
453 }
454}
455#[doc = "Specifies a node in the web service graph. The node can either be an input, output or asset node, so only one of the corresponding id properties is populated at any given time."]
456#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
457pub struct GraphNode {
458 #[doc = "The id of the asset represented by this node."]
459 #[serde(rename = "assetId", default, skip_serializing_if = "Option::is_none")]
460 pub asset_id: Option<String>,
461 #[doc = "The id of the input element represented by this node."]
462 #[serde(rename = "inputId", default, skip_serializing_if = "Option::is_none")]
463 pub input_id: Option<String>,
464 #[doc = "The id of the output element represented by this node."]
465 #[serde(rename = "outputId", default, skip_serializing_if = "Option::is_none")]
466 pub output_id: Option<String>,
467 #[doc = "If applicable, parameters of the node. Global graph parameters map into these, with values set at runtime."]
468 #[serde(default, skip_serializing_if = "Option::is_none")]
469 pub parameters: Option<serde_json::Value>,
470}
471impl GraphNode {
472 pub fn new() -> Self {
473 Self::default()
474 }
475}
476#[doc = "Defines the graph of modules making up the machine learning solution."]
477#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
478pub struct GraphPackage {
479 #[doc = "The set of nodes making up the graph, provided as a nodeId to GraphNode map"]
480 #[serde(default, skip_serializing_if = "Option::is_none")]
481 pub nodes: Option<serde_json::Value>,
482 #[doc = "The list of edges making up the graph."]
483 #[serde(
484 default,
485 deserialize_with = "azure_core::util::deserialize_null_as_default",
486 skip_serializing_if = "Vec::is_empty"
487 )]
488 pub edges: Vec<GraphEdge>,
489 #[doc = "The collection of global parameters for the graph, given as a global parameter name to GraphParameter map. Each parameter here has a 1:1 match with the global parameters values map declared at the WebServiceProperties level."]
490 #[serde(rename = "graphParameters", default, skip_serializing_if = "Option::is_none")]
491 pub graph_parameters: Option<serde_json::Value>,
492}
493impl GraphPackage {
494 pub fn new() -> Self {
495 Self::default()
496 }
497}
498#[doc = "Defines a global parameter in the graph."]
499#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
500pub struct GraphParameter {
501 #[doc = "Description of this graph parameter."]
502 #[serde(default, skip_serializing_if = "Option::is_none")]
503 pub description: Option<String>,
504 #[doc = "Graph parameter's type."]
505 #[serde(rename = "type")]
506 pub type_: graph_parameter::Type,
507 #[doc = "Association links for this parameter to nodes in the graph."]
508 pub links: Vec<GraphParameterLink>,
509}
510impl GraphParameter {
511 pub fn new(type_: graph_parameter::Type, links: Vec<GraphParameterLink>) -> Self {
512 Self {
513 description: None,
514 type_,
515 links,
516 }
517 }
518}
519pub mod graph_parameter {
520 use super::*;
521 #[doc = "Graph parameter's type."]
522 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
523 #[serde(remote = "Type")]
524 pub enum Type {
525 String,
526 Int,
527 Float,
528 Enumerated,
529 Script,
530 Mode,
531 Credential,
532 Boolean,
533 Double,
534 ColumnPicker,
535 ParameterRange,
536 DataGatewayName,
537 #[serde(skip_deserializing)]
538 UnknownValue(String),
539 }
540 impl FromStr for Type {
541 type Err = value::Error;
542 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
543 Self::deserialize(s.into_deserializer())
544 }
545 }
546 impl<'de> Deserialize<'de> for Type {
547 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
548 where
549 D: Deserializer<'de>,
550 {
551 let s = String::deserialize(deserializer)?;
552 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
553 Ok(deserialized)
554 }
555 }
556 impl Serialize for Type {
557 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
558 where
559 S: Serializer,
560 {
561 match self {
562 Self::String => serializer.serialize_unit_variant("Type", 0u32, "String"),
563 Self::Int => serializer.serialize_unit_variant("Type", 1u32, "Int"),
564 Self::Float => serializer.serialize_unit_variant("Type", 2u32, "Float"),
565 Self::Enumerated => serializer.serialize_unit_variant("Type", 3u32, "Enumerated"),
566 Self::Script => serializer.serialize_unit_variant("Type", 4u32, "Script"),
567 Self::Mode => serializer.serialize_unit_variant("Type", 5u32, "Mode"),
568 Self::Credential => serializer.serialize_unit_variant("Type", 6u32, "Credential"),
569 Self::Boolean => serializer.serialize_unit_variant("Type", 7u32, "Boolean"),
570 Self::Double => serializer.serialize_unit_variant("Type", 8u32, "Double"),
571 Self::ColumnPicker => serializer.serialize_unit_variant("Type", 9u32, "ColumnPicker"),
572 Self::ParameterRange => serializer.serialize_unit_variant("Type", 10u32, "ParameterRange"),
573 Self::DataGatewayName => serializer.serialize_unit_variant("Type", 11u32, "DataGatewayName"),
574 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
575 }
576 }
577 }
578}
579#[doc = "Association link for a graph global parameter to a node in the graph."]
580#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
581pub struct GraphParameterLink {
582 #[doc = "The graph node's identifier"]
583 #[serde(rename = "nodeId")]
584 pub node_id: String,
585 #[doc = "The identifier of the node parameter that the global parameter maps to."]
586 #[serde(rename = "parameterKey")]
587 pub parameter_key: String,
588}
589impl GraphParameterLink {
590 pub fn new(node_id: String, parameter_key: String) -> Self {
591 Self { node_id, parameter_key }
592 }
593}
594#[doc = "Asset input port"]
595#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
596pub struct InputPort {
597 #[doc = "Port data type."]
598 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
599 pub type_: Option<input_port::Type>,
600}
601impl InputPort {
602 pub fn new() -> Self {
603 Self::default()
604 }
605}
606pub mod input_port {
607 use super::*;
608 #[doc = "Port data type."]
609 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
610 #[serde(remote = "Type")]
611 pub enum Type {
612 Dataset,
613 #[serde(skip_deserializing)]
614 UnknownValue(String),
615 }
616 impl FromStr for Type {
617 type Err = value::Error;
618 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
619 Self::deserialize(s.into_deserializer())
620 }
621 }
622 impl<'de> Deserialize<'de> for Type {
623 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
624 where
625 D: Deserializer<'de>,
626 {
627 let s = String::deserialize(deserializer)?;
628 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
629 Ok(deserialized)
630 }
631 }
632 impl Serialize for Type {
633 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
634 where
635 S: Serializer,
636 {
637 match self {
638 Self::Dataset => serializer.serialize_unit_variant("Type", 0u32, "Dataset"),
639 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
640 }
641 }
642 }
643 impl Default for Type {
644 fn default() -> Self {
645 Self::Dataset
646 }
647 }
648}
649#[doc = "Information about the machine learning workspace containing the experiment that is source for the web service."]
650#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
651pub struct MachineLearningWorkspace {
652 #[doc = "Specifies the workspace ID of the machine learning workspace associated with the web service"]
653 pub id: String,
654}
655impl MachineLearningWorkspace {
656 pub fn new(id: String) -> Self {
657 Self { id }
658 }
659}
660#[doc = "Nested parameter definition."]
661#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
662pub struct ModeValueInfo {
663 #[doc = "The interface string name for the nested parameter."]
664 #[serde(rename = "interfaceString", default, skip_serializing_if = "Option::is_none")]
665 pub interface_string: Option<String>,
666 #[doc = "The definition of the parameter."]
667 #[serde(
668 default,
669 deserialize_with = "azure_core::util::deserialize_null_as_default",
670 skip_serializing_if = "Vec::is_empty"
671 )]
672 pub parameters: Vec<ModuleAssetParameter>,
673}
674impl ModeValueInfo {
675 pub fn new() -> Self {
676 Self::default()
677 }
678}
679#[doc = "Parameter definition for a module asset."]
680#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
681pub struct ModuleAssetParameter {
682 #[doc = "Parameter name."]
683 #[serde(default, skip_serializing_if = "Option::is_none")]
684 pub name: Option<String>,
685 #[doc = "Parameter type."]
686 #[serde(rename = "parameterType", default, skip_serializing_if = "Option::is_none")]
687 pub parameter_type: Option<String>,
688 #[doc = "Definitions for nested interface parameters if this is a complex module parameter."]
689 #[serde(rename = "modeValuesInfo", default, skip_serializing_if = "Option::is_none")]
690 pub mode_values_info: Option<serde_json::Value>,
691}
692impl ModuleAssetParameter {
693 pub fn new() -> Self {
694 Self::default()
695 }
696}
697#[doc = "The API operation info."]
698#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
699pub struct OperationDisplayInfo {
700 #[doc = "The description of the operation."]
701 #[serde(default, skip_serializing_if = "Option::is_none")]
702 pub description: Option<String>,
703 #[doc = "The action that users can perform, based on their permission level."]
704 #[serde(default, skip_serializing_if = "Option::is_none")]
705 pub operation: Option<String>,
706 #[doc = "The service provider."]
707 #[serde(default, skip_serializing_if = "Option::is_none")]
708 pub provider: Option<String>,
709 #[doc = "The resource on which the operation is performed."]
710 #[serde(default, skip_serializing_if = "Option::is_none")]
711 pub resource: Option<String>,
712}
713impl OperationDisplayInfo {
714 pub fn new() -> Self {
715 Self::default()
716 }
717}
718#[doc = "An API operation."]
719#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
720pub struct OperationEntity {
721 #[doc = "Operation name: {provider}/{resource}/{operation}."]
722 #[serde(default, skip_serializing_if = "Option::is_none")]
723 pub name: Option<String>,
724 #[doc = "The API operation info."]
725 #[serde(default, skip_serializing_if = "Option::is_none")]
726 pub display: Option<OperationDisplayInfo>,
727}
728impl OperationEntity {
729 pub fn new() -> Self {
730 Self::default()
731 }
732}
733#[doc = "The list of REST API operations."]
734#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
735pub struct OperationEntityListResult {
736 #[doc = "The list of operations."]
737 #[serde(
738 default,
739 deserialize_with = "azure_core::util::deserialize_null_as_default",
740 skip_serializing_if = "Vec::is_empty"
741 )]
742 pub value: Vec<OperationEntity>,
743}
744impl azure_core::Continuable for OperationEntityListResult {
745 type Continuation = String;
746 fn continuation(&self) -> Option<Self::Continuation> {
747 None
748 }
749}
750impl OperationEntityListResult {
751 pub fn new() -> Self {
752 Self::default()
753 }
754}
755#[doc = "Asset output port"]
756#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
757pub struct OutputPort {
758 #[doc = "Port data type."]
759 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
760 pub type_: Option<output_port::Type>,
761}
762impl OutputPort {
763 pub fn new() -> Self {
764 Self::default()
765 }
766}
767pub mod output_port {
768 use super::*;
769 #[doc = "Port data type."]
770 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
771 #[serde(remote = "Type")]
772 pub enum Type {
773 Dataset,
774 #[serde(skip_deserializing)]
775 UnknownValue(String),
776 }
777 impl FromStr for Type {
778 type Err = value::Error;
779 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
780 Self::deserialize(s.into_deserializer())
781 }
782 }
783 impl<'de> Deserialize<'de> for Type {
784 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
785 where
786 D: Deserializer<'de>,
787 {
788 let s = String::deserialize(deserializer)?;
789 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
790 Ok(deserialized)
791 }
792 }
793 impl Serialize for Type {
794 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
795 where
796 S: Serializer,
797 {
798 match self {
799 Self::Dataset => serializer.serialize_unit_variant("Type", 0u32, "Dataset"),
800 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
801 }
802 }
803 }
804 impl Default for Type {
805 fn default() -> Self {
806 Self::Dataset
807 }
808 }
809}
810#[doc = "Paginated list of web services."]
811#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
812pub struct PaginatedWebServicesList {
813 #[doc = "An array of web service objects."]
814 #[serde(
815 default,
816 deserialize_with = "azure_core::util::deserialize_null_as_default",
817 skip_serializing_if = "Vec::is_empty"
818 )]
819 pub value: Vec<WebService>,
820 #[doc = "A continuation link (absolute URI) to the next page of results in the list."]
821 #[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
822 pub next_link: Option<String>,
823}
824impl azure_core::Continuable for PaginatedWebServicesList {
825 type Continuation = String;
826 fn continuation(&self) -> Option<Self::Continuation> {
827 self.next_link.clone().filter(|value| !value.is_empty())
828 }
829}
830impl PaginatedWebServicesList {
831 pub fn new() -> Self {
832 Self::default()
833 }
834}
835#[doc = "Azure resource."]
836#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
837pub struct PatchedResource {
838 #[doc = "Specifies the resource ID."]
839 #[serde(default, skip_serializing_if = "Option::is_none")]
840 pub id: Option<String>,
841 #[doc = "Specifies the name of the resource."]
842 #[serde(default, skip_serializing_if = "Option::is_none")]
843 pub name: Option<String>,
844 #[doc = "Specifies the location of the resource."]
845 #[serde(default, skip_serializing_if = "Option::is_none")]
846 pub location: Option<String>,
847 #[doc = "Specifies the type of the resource."]
848 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
849 pub type_: Option<String>,
850 #[doc = "Contains resource tags defined as key/value pairs."]
851 #[serde(default, skip_serializing_if = "Option::is_none")]
852 pub tags: Option<serde_json::Value>,
853}
854impl PatchedResource {
855 pub fn new() -> Self {
856 Self::default()
857 }
858}
859#[doc = "Instance of an Patched Azure ML web service resource."]
860#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
861pub struct PatchedWebService {
862 #[serde(flatten)]
863 pub patched_resource: PatchedResource,
864 #[doc = "The set of properties specific to the Azure ML web service resource."]
865 #[serde(default, skip_serializing_if = "Option::is_none")]
866 pub properties: Option<WebServicePropertiesUnion>,
867}
868impl PatchedWebService {
869 pub fn new() -> Self {
870 Self::default()
871 }
872}
873#[doc = "Holds the available configuration options for an Azure ML web service endpoint."]
874#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
875pub struct RealtimeConfiguration {
876 #[doc = "Specifies the maximum concurrent calls that can be made to the web service. Minimum value: 4, Maximum value: 200."]
877 #[serde(rename = "maxConcurrentCalls", default, skip_serializing_if = "Option::is_none")]
878 pub max_concurrent_calls: Option<i64>,
879}
880impl RealtimeConfiguration {
881 pub fn new() -> Self {
882 Self::default()
883 }
884}
885#[doc = "Azure resource."]
886#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
887pub struct Resource {
888 #[doc = "Specifies the resource ID."]
889 #[serde(default, skip_serializing_if = "Option::is_none")]
890 pub id: Option<String>,
891 #[doc = "Specifies the name of the resource."]
892 #[serde(default, skip_serializing_if = "Option::is_none")]
893 pub name: Option<String>,
894 #[doc = "Specifies the location of the resource."]
895 pub location: String,
896 #[doc = "Specifies the type of the resource."]
897 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
898 pub type_: Option<String>,
899 #[doc = "Contains resource tags defined as key/value pairs."]
900 #[serde(default, skip_serializing_if = "Option::is_none")]
901 pub tags: Option<serde_json::Value>,
902}
903impl Resource {
904 pub fn new(location: String) -> Self {
905 Self {
906 id: None,
907 name: None,
908 location,
909 type_: None,
910 tags: None,
911 }
912 }
913}
914#[doc = "The swagger 2.0 schema describing the service's inputs or outputs. See Swagger specification: http://swagger.io/specification/"]
915#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
916pub struct ServiceInputOutputSpecification {
917 #[doc = "The title of your Swagger schema."]
918 #[serde(default, skip_serializing_if = "Option::is_none")]
919 pub title: Option<String>,
920 #[doc = "The description of the Swagger schema."]
921 #[serde(default, skip_serializing_if = "Option::is_none")]
922 pub description: Option<String>,
923 #[doc = "The type of the entity described in swagger. Always 'object'."]
924 #[serde(rename = "type")]
925 pub type_: String,
926 #[doc = "Specifies a collection that contains the column schema for each input or output of the web service. For more information, see the Swagger specification."]
927 pub properties: serde_json::Value,
928}
929impl ServiceInputOutputSpecification {
930 pub fn new(type_: String, properties: serde_json::Value) -> Self {
931 Self {
932 title: None,
933 description: None,
934 type_,
935 properties,
936 }
937 }
938}
939#[doc = "Access information for a storage account."]
940#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
941pub struct StorageAccount {
942 #[doc = "Specifies the name of the storage account."]
943 #[serde(default, skip_serializing_if = "Option::is_none")]
944 pub name: Option<String>,
945 #[doc = "Specifies the key used to access the storage account."]
946 #[serde(default, skip_serializing_if = "Option::is_none")]
947 pub key: Option<String>,
948}
949impl StorageAccount {
950 pub fn new() -> Self {
951 Self::default()
952 }
953}
954#[doc = "The swagger 2.0 schema describing a single service input or output. See Swagger specification: http://swagger.io/specification/"]
955#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
956pub struct TableSpecification {
957 #[doc = "Swagger schema title."]
958 #[serde(default, skip_serializing_if = "Option::is_none")]
959 pub title: Option<String>,
960 #[doc = "Swagger schema description."]
961 #[serde(default, skip_serializing_if = "Option::is_none")]
962 pub description: Option<String>,
963 #[doc = "The type of the entity described in swagger."]
964 #[serde(rename = "type")]
965 pub type_: String,
966 #[doc = "The format, if 'type' is not 'object'"]
967 #[serde(default, skip_serializing_if = "Option::is_none")]
968 pub format: Option<String>,
969 #[doc = "The set of columns within the data table."]
970 #[serde(default, skip_serializing_if = "Option::is_none")]
971 pub properties: Option<serde_json::Value>,
972}
973impl TableSpecification {
974 pub fn new(type_: String) -> Self {
975 Self {
976 title: None,
977 description: None,
978 type_,
979 format: None,
980 properties: None,
981 }
982 }
983}
984#[doc = "Instance of an Azure ML web service resource."]
985#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
986pub struct WebService {
987 #[serde(flatten)]
988 pub resource: Resource,
989 #[doc = "The set of properties specific to the Azure ML web service resource."]
990 pub properties: WebServicePropertiesUnion,
991}
992impl WebService {
993 pub fn new(resource: Resource, properties: WebServicePropertiesUnion) -> Self {
994 Self { resource, properties }
995 }
996}
997#[doc = "Access keys for the web service calls."]
998#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
999pub struct WebServiceKeys {
1000 #[doc = "The primary access key."]
1001 #[serde(default, skip_serializing_if = "Option::is_none")]
1002 pub primary: Option<String>,
1003 #[doc = "The secondary access key."]
1004 #[serde(default, skip_serializing_if = "Option::is_none")]
1005 pub secondary: Option<String>,
1006}
1007impl WebServiceKeys {
1008 pub fn new() -> Self {
1009 Self::default()
1010 }
1011}
1012#[doc = "Web Service Parameter object for node and global parameter"]
1013#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1014pub struct WebServiceParameter {
1015 #[doc = "The parameter value"]
1016 #[serde(default, skip_serializing_if = "Option::is_none")]
1017 pub value: Option<serde_json::Value>,
1018 #[doc = "If the parameter value in 'value' field is encrypted, the thumbprint of the certificate should be put here."]
1019 #[serde(rename = "certificateThumbprint", default, skip_serializing_if = "Option::is_none")]
1020 pub certificate_thumbprint: Option<String>,
1021}
1022impl WebServiceParameter {
1023 pub fn new() -> Self {
1024 Self::default()
1025 }
1026}
1027#[doc = "The set of properties specific to the Azure ML web service resource."]
1028#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1029pub struct WebServiceProperties {
1030 #[doc = "The title of the web service."]
1031 #[serde(default, skip_serializing_if = "Option::is_none")]
1032 pub title: Option<String>,
1033 #[doc = "The description of the web service."]
1034 #[serde(default, skip_serializing_if = "Option::is_none")]
1035 pub description: Option<String>,
1036 #[doc = "Read Only: The date and time when the web service was created."]
1037 #[serde(rename = "createdOn", default, with = "azure_core::date::rfc3339::option")]
1038 pub created_on: Option<::time::OffsetDateTime>,
1039 #[doc = "Read Only: The date and time when the web service was last modified."]
1040 #[serde(rename = "modifiedOn", default, with = "azure_core::date::rfc3339::option")]
1041 pub modified_on: Option<::time::OffsetDateTime>,
1042 #[doc = "Read Only: The provision state of the web service. Valid values are Unknown, Provisioning, Succeeded, and Failed."]
1043 #[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
1044 pub provisioning_state: Option<web_service_properties::ProvisioningState>,
1045 #[doc = "Access keys for the web service calls."]
1046 #[serde(default, skip_serializing_if = "Option::is_none")]
1047 pub keys: Option<WebServiceKeys>,
1048 #[doc = "When set to true, indicates that the web service is read-only and can no longer be updated or patched, only removed. Default, is false. Note: Once set to true, you cannot change its value."]
1049 #[serde(rename = "readOnly", default, skip_serializing_if = "Option::is_none")]
1050 pub read_only: Option<bool>,
1051 #[doc = "Read Only: Contains the URI of the swagger spec associated with this web service."]
1052 #[serde(rename = "swaggerLocation", default, skip_serializing_if = "Option::is_none")]
1053 pub swagger_location: Option<String>,
1054 #[doc = "When set to true, sample data is included in the web service's swagger definition. The default value is true."]
1055 #[serde(rename = "exposeSampleData", default, skip_serializing_if = "Option::is_none")]
1056 pub expose_sample_data: Option<bool>,
1057 #[doc = "Holds the available configuration options for an Azure ML web service endpoint."]
1058 #[serde(rename = "realtimeConfiguration", default, skip_serializing_if = "Option::is_none")]
1059 pub realtime_configuration: Option<RealtimeConfiguration>,
1060 #[doc = "Diagnostics settings for an Azure ML web service."]
1061 #[serde(default, skip_serializing_if = "Option::is_none")]
1062 pub diagnostics: Option<DiagnosticsConfiguration>,
1063 #[doc = "Access information for a storage account."]
1064 #[serde(rename = "storageAccount", default, skip_serializing_if = "Option::is_none")]
1065 pub storage_account: Option<StorageAccount>,
1066 #[doc = "Information about the machine learning workspace containing the experiment that is source for the web service."]
1067 #[serde(rename = "machineLearningWorkspace", default, skip_serializing_if = "Option::is_none")]
1068 pub machine_learning_workspace: Option<MachineLearningWorkspace>,
1069 #[doc = "Information about the machine learning commitment plan associated with the web service."]
1070 #[serde(rename = "commitmentPlan", default, skip_serializing_if = "Option::is_none")]
1071 pub commitment_plan: Option<CommitmentPlan>,
1072 #[doc = "The swagger 2.0 schema describing the service's inputs or outputs. See Swagger specification: http://swagger.io/specification/"]
1073 #[serde(default, skip_serializing_if = "Option::is_none")]
1074 pub input: Option<ServiceInputOutputSpecification>,
1075 #[doc = "The swagger 2.0 schema describing the service's inputs or outputs. See Swagger specification: http://swagger.io/specification/"]
1076 #[serde(default, skip_serializing_if = "Option::is_none")]
1077 pub output: Option<ServiceInputOutputSpecification>,
1078 #[doc = "Sample input data for the service's input(s)."]
1079 #[serde(rename = "exampleRequest", default, skip_serializing_if = "Option::is_none")]
1080 pub example_request: Option<ExampleRequest>,
1081 #[doc = "Contains user defined properties describing web service assets. Properties are expressed as Key/Value pairs."]
1082 #[serde(default, skip_serializing_if = "Option::is_none")]
1083 pub assets: Option<serde_json::Value>,
1084 #[doc = "The set of global parameters values defined for the web service, given as a global parameter name to default value map. If no default value is specified, the parameter is considered to be required."]
1085 #[serde(default, skip_serializing_if = "Option::is_none")]
1086 pub parameters: Option<serde_json::Value>,
1087 #[doc = "When set to true, indicates that the payload size is larger than 3 MB. Otherwise false. If the payload size exceed 3 MB, the payload is stored in a blob and the PayloadsLocation parameter contains the URI of the blob. Otherwise, this will be set to false and Assets, Input, Output, Package, Parameters, ExampleRequest are inline. The Payload sizes is determined by adding the size of the Assets, Input, Output, Package, Parameters, and the ExampleRequest."]
1088 #[serde(rename = "payloadsInBlobStorage", default, skip_serializing_if = "Option::is_none")]
1089 pub payloads_in_blob_storage: Option<bool>,
1090 #[doc = "Describes the access location for a blob."]
1091 #[serde(rename = "payloadsLocation", default, skip_serializing_if = "Option::is_none")]
1092 pub payloads_location: Option<BlobLocation>,
1093}
1094impl WebServiceProperties {
1095 pub fn new() -> Self {
1096 Self {
1097 title: None,
1098 description: None,
1099 created_on: None,
1100 modified_on: None,
1101 provisioning_state: None,
1102 keys: None,
1103 read_only: None,
1104 swagger_location: None,
1105 expose_sample_data: None,
1106 realtime_configuration: None,
1107 diagnostics: None,
1108 storage_account: None,
1109 machine_learning_workspace: None,
1110 commitment_plan: None,
1111 input: None,
1112 output: None,
1113 example_request: None,
1114 assets: None,
1115 parameters: None,
1116 payloads_in_blob_storage: None,
1117 payloads_location: None,
1118 }
1119 }
1120}
1121pub mod web_service_properties {
1122 use super::*;
1123 #[doc = "Read Only: The provision state of the web service. Valid values are Unknown, Provisioning, Succeeded, and Failed."]
1124 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1125 #[serde(remote = "ProvisioningState")]
1126 pub enum ProvisioningState {
1127 Unknown,
1128 Provisioning,
1129 Succeeded,
1130 Failed,
1131 #[serde(skip_deserializing)]
1132 UnknownValue(String),
1133 }
1134 impl FromStr for ProvisioningState {
1135 type Err = value::Error;
1136 fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
1137 Self::deserialize(s.into_deserializer())
1138 }
1139 }
1140 impl<'de> Deserialize<'de> for ProvisioningState {
1141 fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1142 where
1143 D: Deserializer<'de>,
1144 {
1145 let s = String::deserialize(deserializer)?;
1146 let deserialized = Self::from_str(&s).unwrap_or(Self::UnknownValue(s));
1147 Ok(deserialized)
1148 }
1149 }
1150 impl Serialize for ProvisioningState {
1151 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1152 where
1153 S: Serializer,
1154 {
1155 match self {
1156 Self::Unknown => serializer.serialize_unit_variant("ProvisioningState", 0u32, "Unknown"),
1157 Self::Provisioning => serializer.serialize_unit_variant("ProvisioningState", 1u32, "Provisioning"),
1158 Self::Succeeded => serializer.serialize_unit_variant("ProvisioningState", 2u32, "Succeeded"),
1159 Self::Failed => serializer.serialize_unit_variant("ProvisioningState", 3u32, "Failed"),
1160 Self::UnknownValue(s) => serializer.serialize_str(s.as_str()),
1161 }
1162 }
1163 }
1164}
1165#[doc = "Specifies the package type. Valid values are Graph (Specifies a web service published through the Machine Learning Studio) and Code (Specifies a web service published using code such as Python). Note: Code is not supported at this time."]
1166#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1167#[serde(tag = "packageType")]
1168pub enum WebServicePropertiesUnion {
1169 Graph(WebServicePropertiesForGraph),
1170}
1171#[doc = "Properties specific to a Graph based web service."]
1172#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1173pub struct WebServicePropertiesForGraph {
1174 #[serde(flatten)]
1175 pub web_service_properties: WebServiceProperties,
1176 #[doc = "Defines the graph of modules making up the machine learning solution."]
1177 #[serde(default, skip_serializing_if = "Option::is_none")]
1178 pub package: Option<GraphPackage>,
1179}
1180impl WebServicePropertiesForGraph {
1181 pub fn new(web_service_properties: WebServiceProperties) -> Self {
1182 Self {
1183 web_service_properties,
1184 package: None,
1185 }
1186 }
1187}