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
                                      */

/// RemoteFunctionOptions : Options for a remote user-defined function.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct RemoteFunctionOptions {
    /// Fully qualified name of the user-provided connection object which holds the authentication information to send requests to the remote service. Format: ```\"projects/{projectId}/locations/{locationId}/connections/{connectionId}\"```
    #[serde(rename = "connection", skip_serializing_if = "Option::is_none")]
    pub connection: Option<String>,
    /// Endpoint of the user-provided remote service, e.g. ```https://us-east1-my_gcf_project.cloudfunctions.net/remote_add```
    #[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
    pub endpoint: Option<String>,
    /// Max number of rows in each batch sent to the remote service. If absent or if 0, BigQuery dynamically decides the number of rows in a batch.
    #[serde(rename = "maxBatchingRows", skip_serializing_if = "Option::is_none")]
    pub max_batching_rows: Option<String>,
    /// User-defined context as a set of key/value pairs, which will be sent as function invocation context together with batched arguments in the requests to the remote service. The total number of bytes of keys and values must be less than 8KB.
    #[serde(rename = "userDefinedContext", skip_serializing_if = "Option::is_none")]
    pub user_defined_context: Option<::std::collections::HashMap<String, String>>,
}

impl RemoteFunctionOptions {
    /// Options for a remote user-defined function.
    pub fn new() -> RemoteFunctionOptions {
        RemoteFunctionOptions {
            connection: None,
            endpoint: None,
            max_batching_rows: None,
            user_defined_context: None,
        }
    }
}
