pub fn from_auth_token<S>(
        application_id: S,
        authorization_token: S,
        region: S,
    ) -> Result<CustomCommandsConfig>
    where
        S: Into<Vec<u8>>,
    {
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let c_authorization_token = CString::new(authorization_token)?;
            let c_region = CString::new(region)?;
            let c_application_id = CString::new(application_id)?;
            let ret = custom_commands_config_from_authorization_token(
                &mut handle,
                c_application_id.as_ptr(),
                c_authorization_token.as_ptr(),
                c_region.as_ptr(),
            );
            convert_err(ret, "CustomCommandsConfig::from_auth_token error")?;
            Ok(CustomCommandsConfig {
                config: SpeechConfig::from_handle(handle)?,
            })
        }
    }
/// Creates a Custom Commands config instance with the specified application id
/// authorization token and region.
/// Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
/// expires, the caller needs to refresh it by calling this setter with a new valid token.
/// As configuration values are copied when creating a new connector, the new token value will not apply to connectors that have
/// already been created.
/// For connectors that have been created before, you need to set authorization token of the corresponding connector
/// to refresh the token. Otherwise, the connectors will encounter errors during operation.
Creates a Custom Commands config instance with the specified application id
authorization token and region.
Note: The caller needs to ensure that the authorization token is valid. Before the authorization token
expires, the caller needs to refresh it by calling this setter with a new valid token.
As configuration values are copied when creating a new connector, the new token value will not apply to connectors that have
already been created.
For connectors that have been created before, you need to set authorization token of the corresponding connector
to refresh the token. Otherwise, the connectors will encounter errors during operation.
Creates a Custom Commands config instance with the specified application id authorization token and region . Note : The caller needs to ensure that the authorization token is valid . Before the authorization token expires the caller needs to refresh it by calling this setter with a new valid token . As configuration values are copied when creating a new connector the new token value will not apply to connectors that have already been created . For connectors that have been created before you need to set authorization token of the corresponding connector to refresh the token . Otherwise the connectors will encounter errors during operation .
pub fn from_auth_token<S>(
        application_id: S,
        authorization_token: S,
        region: S,
    ) -> Result<CustomCommandsConfig>
    where
        S: Into<Vec<u8>>,
    {
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let c_authorization_token = CString::new(authorization_token)?;
            let c_region = CString::new(region)?;
            let c_application_id = CString::new(application_id)?;
            let ret = custom_commands_config_from_authorization_token(
                &mut handle,
                c_application_id.as_ptr(),
                c_authorization_token.as_ptr(),
                c_region.as_ptr(),
            );
            convert_err(ret, "CustomCommandsConfig::from_auth_token error")?;
            Ok(CustomCommandsConfig {
                config: SpeechConfig::from_handle(handle)?,
            })
        }
    }
pub fn from_auth_token < S > ( application_id : S , authorization_token : S , region : S , ) -> Result < CustomCommandsConfig > where S : Into < Vec < u8 > > , { unsafe { let mut handle : SPXSPEECHCONFIGHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let c_authorization_token = CString :: new ( authorization_token ) ? ; let c_region = CString :: new ( region ) ? ; let c_application_id = CString :: new ( application_id ) ? ; let ret = custom_commands_config_from_authorization_token ( & mut handle , c_application_id . as_ptr ( ) , c_authorization_token . as_ptr ( ) , c_region . as_ptr ( ) , ) ; convert_err ( ret , " " ) ? ; Ok ( CustomCommandsConfig { config : SpeechConfig :: from_handle ( handle ) ? , } ) } }
Creates a Custom Commands config instance with the specified application id
authorization token and region.
Creates a Custom Commands config instance with the specified application id authorization token and region .
application_id
S
authorization_token
S
region
S
application_id
S
authorization_token
S
region
S