Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-26 17:14:48.296288",
"spec_repo_commit": "69e8c6e4"
"regenerated": "2023-07-28 14:18:05.634924",
"spec_repo_commit": "6f54a513"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-26 17:14:48.308944",
"spec_repo_commit": "69e8c6e4"
"regenerated": "2023-07-28 14:18:05.655511",
"spec_repo_commit": "6f54a513"
}
}
}
71 changes: 51 additions & 20 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1481,25 +1481,15 @@ components:
properties:
attributes:
additionalProperties: {}
description: JSON object of attributes from CI Visibility events.
description: JSON object of attributes from CI Visibility test events.
example:
customAttribute: 123
duration: 2345
type: object
service:
description: 'The name of the application or service generating CI Visibility
events.

It is used to switch from CI Visibility to APM, so make sure you define
the same

value when you use both products.'
example: web-ui-tests
type: string
tags:
$ref: '#/components/schemas/TagsEventAttribute'
timestamp:
$ref: '#/components/schemas/TimestampEventAttribute'
test_level:
$ref: '#/components/schemas/CIAppTestLevel'
type: object
CIAppGitInfo:
description: 'If pipelines are triggered due to actions to a Git repository,
Expand Down Expand Up @@ -1661,14 +1651,30 @@ components:
stored by Datadog.
properties:
attributes:
$ref: '#/components/schemas/CIAppEventAttributes'
$ref: '#/components/schemas/CIAppPipelineEventAttributes'
id:
description: Unique ID of the event.
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
type: string
type:
$ref: '#/components/schemas/CIAppPipelineEventTypeName'
type: object
CIAppPipelineEventAttributes:
description: JSON object containing all event attributes and their associated
values.
properties:
attributes:
additionalProperties: {}
description: JSON object of attributes from CI Visibility pipeline events.
example:
customAttribute: 123
duration: 2345
type: object
ci_level:
$ref: '#/components/schemas/CIAppPipelineLevel'
tags:
$ref: '#/components/schemas/TagsEventAttribute'
type: object
CIAppPipelineEventJob:
description: Details of a CI job.
properties:
Expand Down Expand Up @@ -2190,6 +2196,22 @@ components:
meta:
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
type: object
CIAppPipelineLevel:
description: Pipeline execution level.
enum:
- pipeline
- stage
- job
- step
- custom
example: pipeline
type: string
x-enum-varnames:
- PIPELINE
- STAGE
- JOB
- STEP
- CUSTOM
CIAppPipelinesAggregateRequest:
description: The object sent with the request to retrieve aggregation buckets
of pipeline events from your organization.
Expand Down Expand Up @@ -2463,6 +2485,20 @@ components:
meta:
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
type: object
CIAppTestLevel:
description: Test run level.
enum:
- session
- module
- suite
- test
example: test
type: string
x-enum-varnames:
- SESSION
- MODULE
- SUITE
- TEST
CIAppTestsAggregateRequest:
description: The object sent with the request to retrieve aggregation buckets
of test events from your organization.
Expand Down Expand Up @@ -2500,7 +2536,7 @@ components:
links:
$ref: '#/components/schemas/CIAppResponseLinks'
meta:
$ref: '#/components/schemas/CIAppResponseMetadata'
$ref: '#/components/schemas/CIAppResponseMetadataWithPagination'
type: object
CIAppTestsBucketResponse:
description: Bucket values.
Expand Down Expand Up @@ -16579,11 +16615,6 @@ components:
items:
$ref: '#/components/schemas/TimeseriesResponseValues'
type: array
TimestampEventAttribute:
description: Timestamp of your event.
example: '2019-01-02T09:42:36.320Z'
format: date-time
type: string
Unit:
description: Object containing the metric unit family, scale factor, name, and
short name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand All @@ -22,9 +21,8 @@
/** JSON object containing all event attributes and their associated values. */
@JsonPropertyOrder({
CIAppEventAttributes.JSON_PROPERTY_ATTRIBUTES,
CIAppEventAttributes.JSON_PROPERTY_SERVICE,
CIAppEventAttributes.JSON_PROPERTY_TAGS,
CIAppEventAttributes.JSON_PROPERTY_TIMESTAMP
CIAppEventAttributes.JSON_PROPERTY_TEST_LEVEL
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -33,14 +31,11 @@ public class CIAppEventAttributes {
public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
private Map<String, Object> attributes = null;

public static final String JSON_PROPERTY_SERVICE = "service";
private String service;

public static final String JSON_PROPERTY_TAGS = "tags";
private List<String> tags = null;

public static final String JSON_PROPERTY_TIMESTAMP = "timestamp";
private OffsetDateTime timestamp;
public static final String JSON_PROPERTY_TEST_LEVEL = "test_level";
private CIAppTestLevel testLevel;

public CIAppEventAttributes attributes(Map<String, Object> attributes) {
this.attributes = attributes;
Expand All @@ -56,7 +51,7 @@ public CIAppEventAttributes putAttributesItem(String key, Object attributesItem)
}

/**
* JSON object of attributes from CI Visibility events.
* JSON object of attributes from CI Visibility test events.
*
* @return attributes
*/
Expand All @@ -71,28 +66,6 @@ public void setAttributes(Map<String, Object> attributes) {
this.attributes = attributes;
}

public CIAppEventAttributes service(String service) {
this.service = service;
return this;
}

/**
* The name of the application or service generating CI Visibility events. It is used to switch
* from CI Visibility to APM, so make sure you define the same value when you use both products.
*
* @return service
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SERVICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getService() {
return service;
}

public void setService(String service) {
this.service = service;
}

public CIAppEventAttributes tags(List<String> tags) {
this.tags = tags;
return this;
Expand Down Expand Up @@ -122,25 +95,29 @@ public void setTags(List<String> tags) {
this.tags = tags;
}

public CIAppEventAttributes timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
public CIAppEventAttributes testLevel(CIAppTestLevel testLevel) {
this.testLevel = testLevel;
this.unparsed |= !testLevel.isValid();
return this;
}

/**
* Timestamp of your event.
* Test run level.
*
* @return timestamp
* @return testLevel
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIMESTAMP)
@JsonProperty(JSON_PROPERTY_TEST_LEVEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getTimestamp() {
return timestamp;
public CIAppTestLevel getTestLevel() {
return testLevel;
}

public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
public void setTestLevel(CIAppTestLevel testLevel) {
if (!testLevel.isValid()) {
this.unparsed = true;
}
this.testLevel = testLevel;
}

/**
Expand Down Expand Up @@ -200,25 +177,23 @@ public boolean equals(Object o) {
}
CIAppEventAttributes ciAppEventAttributes = (CIAppEventAttributes) o;
return Objects.equals(this.attributes, ciAppEventAttributes.attributes)
&& Objects.equals(this.service, ciAppEventAttributes.service)
&& Objects.equals(this.tags, ciAppEventAttributes.tags)
&& Objects.equals(this.timestamp, ciAppEventAttributes.timestamp)
&& Objects.equals(this.testLevel, ciAppEventAttributes.testLevel)
&& Objects.equals(this.additionalProperties, ciAppEventAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(attributes, service, tags, timestamp, additionalProperties);
return Objects.hash(attributes, tags, testLevel, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CIAppEventAttributes {\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" service: ").append(toIndentedString(service)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" testLevel: ").append(toIndentedString(testLevel)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
public class CIAppPipelineEvent {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
private CIAppEventAttributes attributes;
private CIAppPipelineEventAttributes attributes;

public static final String JSON_PROPERTY_ID = "id";
private String id;

public static final String JSON_PROPERTY_TYPE = "type";
private CIAppPipelineEventTypeName type;

public CIAppPipelineEvent attributes(CIAppEventAttributes attributes) {
public CIAppPipelineEvent attributes(CIAppPipelineEventAttributes attributes) {
this.attributes = attributes;
this.unparsed |= attributes.unparsed;
return this;
Expand All @@ -49,11 +49,11 @@ public CIAppPipelineEvent attributes(CIAppEventAttributes attributes) {
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public CIAppEventAttributes getAttributes() {
public CIAppPipelineEventAttributes getAttributes() {
return attributes;
}

public void setAttributes(CIAppEventAttributes attributes) {
public void setAttributes(CIAppPipelineEventAttributes attributes) {
this.attributes = attributes;
}

Expand Down
Loading