Skip to content

Commit 2224add

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a5271b93 of spec repo
1 parent f340d08 commit 2224add

23 files changed

+1229
-527
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-11-25 19:59:33.800085",
8-
"spec_repo_commit": "3c840607"
7+
"regenerated": "2024-11-25 22:28:22.923272",
8+
"spec_repo_commit": "a5271b93"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-25 19:59:33.818780",
13-
"spec_repo_commit": "3c840607"
12+
"regenerated": "2024-11-25 22:28:22.942612",
13+
"spec_repo_commit": "a5271b93"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 188 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,6 +3245,183 @@ components:
32453245
tags:
32463246
$ref: '#/components/schemas/TagsEventAttribute'
32473247
type: object
3248+
CIAppPipelineEventFinishedPipeline:
3249+
description: Details of a finished pipeline.
3250+
properties:
3251+
end:
3252+
description: Time when the pipeline run finished. It cannot be older than
3253+
18 hours in the past from the current time. The time format must be RFC3339.
3254+
example: '2023-05-31T15:30:00Z'
3255+
format: date-time
3256+
type: string
3257+
error:
3258+
$ref: '#/components/schemas/CIAppCIError'
3259+
git:
3260+
$ref: '#/components/schemas/CIAppGitInfo'
3261+
is_manual:
3262+
description: Whether or not the pipeline was triggered manually by the user.
3263+
example: false
3264+
nullable: true
3265+
type: boolean
3266+
is_resumed:
3267+
description: Whether or not the pipeline was resumed after being blocked.
3268+
example: false
3269+
nullable: true
3270+
type: boolean
3271+
level:
3272+
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
3273+
metrics:
3274+
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
3275+
name:
3276+
description: Name of the pipeline. All pipeline runs for the builds should
3277+
have the same name.
3278+
example: Deploy to AWS
3279+
type: string
3280+
node:
3281+
$ref: '#/components/schemas/CIAppHostInfo'
3282+
parameters:
3283+
$ref: '#/components/schemas/CIAppPipelineEventParameters'
3284+
parent_pipeline:
3285+
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
3286+
partial_retry:
3287+
description: 'Whether or not the pipeline was a partial retry of a previous
3288+
attempt. A partial retry is one
3289+
3290+
which only runs a subset of the original jobs.'
3291+
example: false
3292+
type: boolean
3293+
pipeline_id:
3294+
description: 'Any ID used in the provider to identify the pipeline run even
3295+
if it is not unique across retries.
3296+
3297+
If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
3298+
can be set to the same value.'
3299+
example: '#023'
3300+
type: string
3301+
previous_attempt:
3302+
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
3303+
queue_time:
3304+
description: The queue time in milliseconds, if applicable.
3305+
example: 1004
3306+
format: int64
3307+
minimum: 0
3308+
nullable: true
3309+
type: integer
3310+
start:
3311+
description: Time when the pipeline run started (it should not include any
3312+
queue time). The time format must be RFC3339.
3313+
example: '2023-05-31T15:30:00Z'
3314+
format: date-time
3315+
type: string
3316+
status:
3317+
$ref: '#/components/schemas/CIAppPipelineEventPipelineStatus'
3318+
tags:
3319+
$ref: '#/components/schemas/CIAppPipelineEventTags'
3320+
unique_id:
3321+
description: 'UUID of the pipeline run. The ID has to be unique across retries
3322+
and pipelines,
3323+
3324+
including partial retries.'
3325+
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
3326+
type: string
3327+
url:
3328+
description: The URL to look at the pipeline in the CI provider UI.
3329+
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
3330+
type: string
3331+
required:
3332+
- level
3333+
- unique_id
3334+
- name
3335+
- url
3336+
- start
3337+
- end
3338+
- status
3339+
- partial_retry
3340+
type: object
3341+
CIAppPipelineEventInProgressPipeline:
3342+
description: Details of a running pipeline.
3343+
properties:
3344+
error:
3345+
$ref: '#/components/schemas/CIAppCIError'
3346+
git:
3347+
$ref: '#/components/schemas/CIAppGitInfo'
3348+
is_manual:
3349+
description: Whether or not the pipeline was triggered manually by the user.
3350+
example: false
3351+
nullable: true
3352+
type: boolean
3353+
is_resumed:
3354+
description: Whether or not the pipeline was resumed after being blocked.
3355+
example: false
3356+
nullable: true
3357+
type: boolean
3358+
level:
3359+
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
3360+
metrics:
3361+
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
3362+
name:
3363+
description: Name of the pipeline. All pipeline runs for the builds should
3364+
have the same name.
3365+
example: Deploy to AWS
3366+
type: string
3367+
node:
3368+
$ref: '#/components/schemas/CIAppHostInfo'
3369+
parameters:
3370+
$ref: '#/components/schemas/CIAppPipelineEventParameters'
3371+
parent_pipeline:
3372+
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
3373+
partial_retry:
3374+
description: 'Whether or not the pipeline was a partial retry of a previous
3375+
attempt. A partial retry is one
3376+
3377+
which only runs a subset of the original jobs.'
3378+
example: false
3379+
type: boolean
3380+
pipeline_id:
3381+
description: 'Any ID used in the provider to identify the pipeline run even
3382+
if it is not unique across retries.
3383+
3384+
If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
3385+
can be set to the same value.'
3386+
example: '#023'
3387+
type: string
3388+
previous_attempt:
3389+
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
3390+
queue_time:
3391+
description: The queue time in milliseconds, if applicable.
3392+
example: 1004
3393+
format: int64
3394+
minimum: 0
3395+
nullable: true
3396+
type: integer
3397+
start:
3398+
description: Time when the pipeline run started (it should not include any
3399+
queue time). The time format must be RFC3339.
3400+
example: '2023-05-31T15:30:00Z'
3401+
format: date-time
3402+
type: string
3403+
status:
3404+
$ref: '#/components/schemas/CIAppPipelineEventPipelineInProgressStatus'
3405+
tags:
3406+
$ref: '#/components/schemas/CIAppPipelineEventTags'
3407+
unique_id:
3408+
description: UUID of the pipeline run. The ID has to be the same as the
3409+
finished pipeline.
3410+
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
3411+
type: string
3412+
url:
3413+
description: The URL to look at the pipeline in the CI provider UI.
3414+
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
3415+
type: string
3416+
required:
3417+
- level
3418+
- unique_id
3419+
- name
3420+
- url
3421+
- start
3422+
- status
3423+
- partial_retry
3424+
type: object
32483425
CIAppPipelineEventJob:
32493426
description: Details of a CI job.
32503427
properties:
@@ -3393,97 +3570,17 @@ components:
33933570
type: object
33943571
CIAppPipelineEventPipeline:
33953572
description: Details of the top level pipeline, build, or workflow of your CI.
3396-
properties:
3397-
end:
3398-
description: Time when the pipeline run finished. It cannot be older than
3399-
18 hours in the past from the current time. The time format must be RFC3339.
3400-
example: '2023-05-31T15:30:00Z'
3401-
format: date-time
3402-
type: string
3403-
error:
3404-
$ref: '#/components/schemas/CIAppCIError'
3405-
git:
3406-
$ref: '#/components/schemas/CIAppGitInfo'
3407-
is_manual:
3408-
description: Whether or not the pipeline was triggered manually by the user.
3409-
example: false
3410-
nullable: true
3411-
type: boolean
3412-
is_resumed:
3413-
description: Whether or not the pipeline was resumed after being blocked.
3414-
example: false
3415-
nullable: true
3416-
type: boolean
3417-
level:
3418-
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
3419-
metrics:
3420-
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
3421-
name:
3422-
description: Name of the pipeline. All pipeline runs for the builds should
3423-
have the same name.
3424-
example: Deploy to AWS
3425-
type: string
3426-
node:
3427-
$ref: '#/components/schemas/CIAppHostInfo'
3428-
parameters:
3429-
$ref: '#/components/schemas/CIAppPipelineEventParameters'
3430-
parent_pipeline:
3431-
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
3432-
partial_retry:
3433-
description: 'Whether or not the pipeline was a partial retry of a previous
3434-
attempt. A partial retry is one
3435-
3436-
which only runs a subset of the original jobs.'
3437-
example: false
3438-
type: boolean
3439-
pipeline_id:
3440-
description: 'Any ID used in the provider to identify the pipeline run even
3441-
if it is not unique across retries.
3442-
3443-
If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
3444-
can be set to the same value.'
3445-
example: '#023'
3446-
type: string
3447-
previous_attempt:
3448-
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
3449-
queue_time:
3450-
description: The queue time in milliseconds, if applicable.
3451-
example: 1004
3452-
format: int64
3453-
minimum: 0
3454-
nullable: true
3455-
type: integer
3456-
start:
3457-
description: Time when the pipeline run started (it should not include any
3458-
queue time). The time format must be RFC3339.
3459-
example: '2023-05-31T15:30:00Z'
3460-
format: date-time
3461-
type: string
3462-
status:
3463-
$ref: '#/components/schemas/CIAppPipelineEventPipelineStatus'
3464-
tags:
3465-
$ref: '#/components/schemas/CIAppPipelineEventTags'
3466-
unique_id:
3467-
description: 'UUID of the pipeline run. The ID has to be unique across retries
3468-
and pipelines,
3469-
3470-
including partial retries.'
3471-
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
3472-
type: string
3473-
url:
3474-
description: The URL to look at the pipeline in the CI provider UI.
3475-
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
3476-
type: string
3477-
required:
3478-
- level
3479-
- unique_id
3480-
- name
3481-
- url
3482-
- start
3483-
- end
3484-
- status
3485-
- partial_retry
3486-
type: object
3573+
oneOf:
3574+
- $ref: '#/components/schemas/CIAppPipelineEventFinishedPipeline'
3575+
- $ref: '#/components/schemas/CIAppPipelineEventInProgressPipeline'
3576+
CIAppPipelineEventPipelineInProgressStatus:
3577+
description: The in progress status of the pipeline.
3578+
enum:
3579+
- running
3580+
example: running
3581+
type: string
3582+
x-enum-varnames:
3583+
- RUNNING
34873584
CIAppPipelineEventPipelineLevel:
34883585
default: pipeline
34893586
description: Used to distinguish between pipelines, stages, jobs, and steps.

examples/v2_ci-visibility-pipelines_CreateCIAppPipelineEvent.rs

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use datadog_api_client::datadogV2::model::CIAppCreatePipelineEventRequestAttribu
88
use datadog_api_client::datadogV2::model::CIAppCreatePipelineEventRequestData;
99
use datadog_api_client::datadogV2::model::CIAppCreatePipelineEventRequestDataType;
1010
use datadog_api_client::datadogV2::model::CIAppGitInfo;
11+
use datadog_api_client::datadogV2::model::CIAppPipelineEventFinishedPipeline;
1112
use datadog_api_client::datadogV2::model::CIAppPipelineEventPipeline;
1213
use datadog_api_client::datadogV2::model::CIAppPipelineEventPipelineLevel;
1314
use datadog_api_client::datadogV2::model::CIAppPipelineEventPipelineStatus;
@@ -19,26 +20,28 @@ async fn main() {
1920
.attributes(CIAppCreatePipelineEventRequestAttributes::new(
2021
CIAppCreatePipelineEventRequestAttributesResource::CIAppPipelineEventPipeline(
2122
Box::new(
22-
CIAppPipelineEventPipeline::new(
23-
DateTime::parse_from_rfc3339("2021-11-11T11:10:41+00:00")
24-
.expect("Failed to parse datetime")
25-
.with_timezone(&Utc),
26-
CIAppPipelineEventPipelineLevel::PIPELINE,
27-
"Deploy to AWS".to_string(),
28-
false,
29-
DateTime::parse_from_rfc3339("2021-11-11T11:09:11+00:00")
30-
.expect("Failed to parse datetime")
31-
.with_timezone(&Utc),
32-
CIAppPipelineEventPipelineStatus::SUCCESS,
33-
"3eacb6f3-ff04-4e10-8a9c-46e6d054024a".to_string(),
34-
"https://my-ci-provider.example/pipelines/my-pipeline/run/1"
35-
.to_string(),
36-
)
37-
.git(Some(CIAppGitInfo::new(
38-
"[email protected]".to_string(),
39-
"https://github.com/DataDog/datadog-agent".to_string(),
40-
"7f263865994b76066c4612fd1965215e7dcb4cd2".to_string(),
41-
))),
23+
CIAppPipelineEventPipeline::CIAppPipelineEventFinishedPipeline(Box::new(
24+
CIAppPipelineEventFinishedPipeline::new(
25+
DateTime::parse_from_rfc3339("2021-11-11T11:10:41+00:00")
26+
.expect("Failed to parse datetime")
27+
.with_timezone(&Utc),
28+
CIAppPipelineEventPipelineLevel::PIPELINE,
29+
"Deploy to AWS".to_string(),
30+
false,
31+
DateTime::parse_from_rfc3339("2021-11-11T11:09:11+00:00")
32+
.expect("Failed to parse datetime")
33+
.with_timezone(&Utc),
34+
CIAppPipelineEventPipelineStatus::SUCCESS,
35+
"3eacb6f3-ff04-4e10-8a9c-46e6d054024a".to_string(),
36+
"https://my-ci-provider.example/pipelines/my-pipeline/run/1"
37+
.to_string(),
38+
)
39+
.git(Some(CIAppGitInfo::new(
40+
"[email protected]".to_string(),
41+
"https://github.com/DataDog/datadog-agent".to_string(),
42+
"7f263865994b76066c4612fd1965215e7dcb4cd2".to_string(),
43+
))),
44+
)),
4245
),
4346
),
4447
))

0 commit comments

Comments
 (0)