Skip to main content

bitwarden_api_api/models/
organization_integration_o_auth_complete_request_model.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15/// OrganizationIntegrationOAuthCompleteRequestModel : The `code` and `state` the provider returned
16/// to the OAuth callback, forwarded by the web vault so an authenticated Organization Owner
17/// finishes the integration setup.
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct OrganizationIntegrationOAuthCompleteRequestModel {
20    #[serde(rename = "code", alias = "Code")]
21    pub code: String,
22    #[serde(rename = "state", alias = "State")]
23    pub state: String,
24}
25
26impl OrganizationIntegrationOAuthCompleteRequestModel {
27    /// The `code` and `state` the provider returned to the OAuth callback, forwarded by the web
28    /// vault so an authenticated Organization Owner finishes the integration setup.
29    pub fn new(code: String, state: String) -> OrganizationIntegrationOAuthCompleteRequestModel {
30        OrganizationIntegrationOAuthCompleteRequestModel { code, state }
31    }
32}