use serde::{Deserialize, Serialize}; /*
                                      * BigQuery API
                                      *
                                      * A data platform for customers to create, manage, share and query data.
                                      *
                                      * The version of the OpenAPI document: v2
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::bigquery_v2::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JobConfiguration {
    #[serde(rename = "copy", skip_serializing_if = "Option::is_none")]
    pub copy: Option<Box<models::JobConfigurationTableCopy>>,
    /// [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
    #[serde(rename = "dryRun", skip_serializing_if = "Option::is_none")]
    pub dry_run: Option<bool>,
    #[serde(rename = "extract", skip_serializing_if = "Option::is_none")]
    pub extract: Option<Box<models::JobConfigurationExtract>>,
    /// [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
    #[serde(rename = "jobTimeoutMs", skip_serializing_if = "Option::is_none")]
    pub job_timeout_ms: Option<String>,
    /// [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
    #[serde(rename = "jobType", skip_serializing_if = "Option::is_none")]
    pub job_type: Option<String>,
    /// The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "load", skip_serializing_if = "Option::is_none")]
    pub load: Option<Box<models::JobConfigurationLoad>>,
    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
    pub query: Option<Box<models::JobConfigurationQuery>>,
}

impl JobConfiguration {
    pub fn new() -> JobConfiguration {
        JobConfiguration {
            copy: None,
            dry_run: None,
            extract: None,
            job_timeout_ms: None,
            job_type: None,
            labels: None,
            load: None,
            query: None,
        }
    }
}
