-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate the rest of the data-plane SDK (#390)
Co-authored-by: Brian Caswell <[email protected]>
- Loading branch information
Showing
258 changed files
with
135,736 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# generated by AutoRust 0.1.0 | ||
[package] | ||
name = "azure_svc_appconfiguration" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
azure_core = { path = "../../../sdk/core", version = "0.1.0" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
reqwest = { version = "0.11", features = ["json"] } | ||
bytes = "1.0" | ||
thiserror = "1.0" | ||
http = "0.2" | ||
url = "2.2" | ||
|
||
[dev-dependencies] | ||
azure_identity = { path = "../../../sdk/identity", version = "0.1.0" } | ||
tokio = { version = "1.0", features = ["macros"] } | ||
|
||
[features] | ||
default = ["package-2019-07"] | ||
"package-2019-07" = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#![doc = "generated by AutoRust 0.1.0"] | ||
#[cfg(feature = "package-2019-07")] | ||
mod package_2019_07; | ||
use azure_core::setters; | ||
#[cfg(feature = "package-2019-07")] | ||
pub use package_2019_07::{models, operations, API_VERSION}; | ||
pub fn config( | ||
http_client: std::sync::Arc<dyn azure_core::HttpClient>, | ||
token_credential: Box<dyn azure_core::TokenCredential>, | ||
) -> OperationConfigBuilder { | ||
OperationConfigBuilder { | ||
api_version: None, | ||
http_client, | ||
base_path: None, | ||
token_credential, | ||
token_credential_resource: None, | ||
} | ||
} | ||
pub struct OperationConfigBuilder { | ||
api_version: Option<String>, | ||
http_client: std::sync::Arc<dyn azure_core::HttpClient>, | ||
base_path: Option<String>, | ||
token_credential: Box<dyn azure_core::TokenCredential>, | ||
token_credential_resource: Option<String>, | ||
} | ||
impl OperationConfigBuilder { | ||
setters! { api_version : String => Some (api_version) , base_path : String => Some (base_path) , token_credential_resource : String => Some (token_credential_resource) , } | ||
pub fn build(self) -> OperationConfig { | ||
OperationConfig { | ||
api_version: self.api_version.unwrap_or(API_VERSION.to_owned()), | ||
http_client: self.http_client, | ||
base_path: self.base_path.unwrap_or("https://management.azure.com".to_owned()), | ||
token_credential: Some(self.token_credential), | ||
token_credential_resource: self.token_credential_resource.unwrap_or("https://management.azure.com/".to_owned()), | ||
} | ||
} | ||
} | ||
pub struct OperationConfig { | ||
api_version: String, | ||
http_client: std::sync::Arc<dyn azure_core::HttpClient>, | ||
base_path: String, | ||
token_credential: Option<Box<dyn azure_core::TokenCredential>>, | ||
token_credential_resource: String, | ||
} | ||
impl OperationConfig { | ||
pub fn api_version(&self) -> &str { | ||
self.api_version.as_str() | ||
} | ||
pub fn http_client(&self) -> &dyn azure_core::HttpClient { | ||
self.http_client.as_ref() | ||
} | ||
pub fn base_path(&self) -> &str { | ||
self.base_path.as_str() | ||
} | ||
pub fn token_credential(&self) -> Option<&dyn azure_core::TokenCredential> { | ||
self.token_credential.as_deref() | ||
} | ||
pub fn token_credential_resource(&self) -> &str { | ||
self.token_credential_resource.as_str() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod models; | ||
pub mod operations; | ||
pub const API_VERSION: &str = "1.0"; |
67 changes: 67 additions & 0 deletions
67
services/svc/appconfiguration/src/package_2019_07/models.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#![doc = "generated by AutoRust 0.1.0"] | ||
#![allow(non_camel_case_types)] | ||
#![allow(unused_imports)] | ||
use serde::{Deserialize, Serialize}; | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct Key { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct KeyValue { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub key: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub label: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub content_type: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub value: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub last_modified: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub tags: Option<serde_json::Value>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub locked: Option<bool>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub etag: Option<String>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct Label { | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct Error { | ||
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")] | ||
pub type_: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub title: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub detail: Option<String>, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub status: Option<i64>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct KeyListResult { | ||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub items: Vec<Key>, | ||
#[serde(rename = "@nextLink", default, skip_serializing_if = "Option::is_none")] | ||
pub next_link: Option<String>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct KeyValueListResult { | ||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub items: Vec<KeyValue>, | ||
#[serde(rename = "@nextLink", default, skip_serializing_if = "Option::is_none")] | ||
pub next_link: Option<String>, | ||
} | ||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] | ||
pub struct LabelListResult { | ||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub items: Vec<Label>, | ||
#[serde(rename = "@nextLink", default, skip_serializing_if = "Option::is_none")] | ||
pub next_link: Option<String>, | ||
} |
Oops, something went wrong.