Skip to content

Commit 7683611

Browse files
authored
Change AgentPoolQueue pool field to be optional (#671)
1 parent 29a2965 commit 7683611

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
- Change `ServiceEndpoint` field to be optional:
1111
- `description`
12+
- Change `AgentPoolQueue` field to be optional:
13+
- `pool`
1214

1315
## [0.30.0]
1416

azure_devops_rust_api/src/build/models.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ pub struct AgentPoolQueue {
1616
#[doc = "The name of the queue."]
1717
pub name: String,
1818
#[doc = "Represents a reference to an agent pool."]
19-
pub pool: TaskAgentPoolReference,
19+
#[serde(default, skip_serializing_if = "Option::is_none")]
20+
pub pool: Option<TaskAgentPoolReference>,
2021
#[doc = "The full http link to the resource."]
2122
#[serde(default, skip_serializing_if = "Option::is_none")]
2223
pub url: Option<String>,
2324
}
2425
impl AgentPoolQueue {
25-
pub fn new(id: i32, name: String, pool: TaskAgentPoolReference) -> Self {
26+
pub fn new(id: i32, name: String) -> Self {
2627
Self {
2728
links: None,
2829
id,
2930
name,
30-
pool,
31+
pool: None,
3132
url: None,
3233
}
3334
}

vsts-api-patcher/src/patcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,9 +1313,9 @@ impl Patcher {
13131313
// Excluded
13141314
// _links
13151315
// url
1316+
// pool"
13161317
r#"[
13171318
"id",
1318-
"pool",
13191319
"name"
13201320
]"#,
13211321
),

0 commit comments

Comments
 (0)