// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: network.slices.slice.updateOAuthClient
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;
use jacquard_common::types::string::UriValue;
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::network_slices::slice::get_o_auth_clients::OauthClientDetails;

#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct UpdateOAuthClient<'a> {
    ///OAuth client ID to update
    #[serde(borrow)]
    pub client_id: CowStr<'a>,
    ///New human-readable name of the OAuth client
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub client_name: Option<CowStr<'a>>,
    ///New URI of the client application
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub client_uri: Option<UriValue<'a>>,
    ///New URI of the client logo
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub logo_uri: Option<UriValue<'a>>,
    ///New URI of the privacy policy
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub policy_uri: Option<UriValue<'a>>,
    ///New allowed redirect URIs for OAuth flow
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub redirect_uris: Option<Vec<UriValue<'a>>>,
    ///New OAuth scope
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub scope: Option<CowStr<'a>>,
    ///New URI of the terms of service
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub tos_uri: Option<UriValue<'a>>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct UpdateOAuthClientOutput<'a> {
    #[serde(flatten)]
    #[serde(borrow)]
    pub value: OauthClientDetails<'a>,
}

/// Response type for network.slices.slice.updateOAuthClient
pub struct UpdateOAuthClientResponse;
impl jacquard_common::xrpc::XrpcResp for UpdateOAuthClientResponse {
    const NSID: &'static str = "network.slices.slice.updateOAuthClient";
    const ENCODING: &'static str = "application/json";
    type Output<'de> = UpdateOAuthClientOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

impl<'a> jacquard_common::xrpc::XrpcRequest for UpdateOAuthClient<'a> {
    const NSID: &'static str = "network.slices.slice.updateOAuthClient";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Response = UpdateOAuthClientResponse;
}

/// Endpoint type for network.slices.slice.updateOAuthClient
pub struct UpdateOAuthClientRequest;
impl jacquard_common::xrpc::XrpcEndpoint for UpdateOAuthClientRequest {
    const PATH: &'static str = "/xrpc/network.slices.slice.updateOAuthClient";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
        "application/json",
    );
    type Request<'de> = UpdateOAuthClient<'de>;
    type Response = UpdateOAuthClientResponse;
}