pub async fn execute(self) -> azure_core::Result<ConfigurationResponse> {
        let uri = format!(
            "https://{}.azure-devices.net/configurations/{}?api-version={}",
            self.service_client.iot_hub_name, &self.configuration_id, API_VERSION
        );

        let mut request = self.service_client.prepare_request(&uri, Method::PUT);

        match &self.etag {
            Some(etag) => {
                request = request.header(http::header::IF_MATCH, format!("\"{}\"", etag));
            }
            None => (),
        }

        let body = CreateOrUpdateConfigurationBody {
            content: self.content,
            etag: self.etag,
            id: &self.configuration_id,
            labels: self.labels,
            metrics: ConfigurationMetrics {
                queries: self.metrics,
                results: HashMap::new(),
            },
            priority: self.priority,
            target_condition: &self.target_condition,
        };

        let body = azure_core::to_json(&body)?;
        let request = request.body(body)?;

        self.service_client
            .http_client()
            .execute_request_check_status(request, http::StatusCode::OK)
            .await?
            .try_into()
    }
/// Performs the create or update request on the device identity
Performs the create or update request on the device identity
Performs the create or update request on the device identity
pub async fn execute(self) -> azure_core::Result<ConfigurationResponse> {
        let uri = format!(
            "https://{}.azure-devices.net/configurations/{}?api-version={}",
            self.service_client.iot_hub_name, &self.configuration_id, API_VERSION
        );
        let mut request = self.service_client.prepare_request(&uri, Method::PUT);
        match &self.etag {
            Some(etag) => {
                request = request.header(http::header::IF_MATCH, format!("\"{}\"", etag));
            }
            None => (),
        }
        let body = CreateOrUpdateConfigurationBody {
            content: self.content,
            etag: self.etag,
            id: &self.configuration_id,
            labels: self.labels,
            metrics: ConfigurationMetrics {
                queries: self.metrics,
                results: HashMap::new(),
            },
            priority: self.priority,
            target_condition: &self.target_condition,
        };
        let body = azure_core::to_json(&body)?;
        let request = request.body(body)?;
        self.service_client
            .http_client()
            .execute_request_check_status(request, http::StatusCode::OK)
            .await?
            .try_into()
    }
pub async fn execute ( self ) -> azure_core :: Result < ConfigurationResponse > { let uri = format ! ( " " self service_client iot_hub_name self configuration_id API_VERSION ) ; let mut request = self . service_client . prepare_request ( & uri , Method :: PUT ) ; match & self . etag { Some ( etag ) => { request = request . header ( http :: header :: IF_MATCH , format ! ( " \" \" " etag ) ) ; } None => ( ) , } let body = CreateOrUpdateConfigurationBody { content : self . content , etag : self . etag , id : & self . configuration_id , labels : self . labels , metrics : ConfigurationMetrics { queries : self . metrics , results : HashMap :: new ( ) , } , priority : self . priority , target_condition : & self . target_condition , } ; let body = azure_core :: to_json ( & body ) ? ; let request = request . body ( body ) ? ; self . service_client . http_client ( ) . execute_request_check_status ( request , http :: StatusCode :: OK ) . await ? . try_into ( ) }
Performs the create or update request on the device identity
Performs the create or update request on the device identity
self