Skip to main content

tapis_workflows/models/
req_dockerhub_context.rs

1/*
2 * Tapis Workflows API
3 *
4 * Create and manage pipelines
5 *
6 * The version of the OpenAPI document: 1.6.0
7 * Contact: cicsupport@tacc.utexas.edu
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReqDockerhubContext {
16    #[serde(rename = "type")]
17    pub r#type: models::EnumContextType,
18    #[serde(rename = "visibility")]
19    pub visibility: models::EnumContextVisibility,
20    #[serde(rename = "url")]
21    pub url: String,
22    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
23    pub tag: Option<String>,
24    #[serde(rename = "credentials", skip_serializing_if = "Option::is_none")]
25    pub credentials: Option<Box<models::ReqDockerhubCred>>,
26    #[serde(rename = "identity_uuid", skip_serializing_if = "Option::is_none")]
27    pub identity_uuid: Option<uuid::Uuid>,
28}
29
30impl ReqDockerhubContext {
31    pub fn new(
32        r#type: models::EnumContextType,
33        visibility: models::EnumContextVisibility,
34        url: String,
35    ) -> ReqDockerhubContext {
36        ReqDockerhubContext {
37            r#type,
38            visibility,
39            url,
40            tag: None,
41            credentials: None,
42            identity_uuid: None,
43        }
44    }
45}