diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0bdcaf3..9d32bf6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,6 +17,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
+ submodules: 'true'
- name: Setup Java
uses: actions/setup-java@v3
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..04cf4ad
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "spec"]
+ path = spec
+ url = git@github.com:cdevents/spec.git
diff --git a/generator/pom.xml b/generator/pom.xml
index ed6f4af..6014747 100644
--- a/generator/pom.xml
+++ b/generator/pom.xml
@@ -23,6 +23,7 @@
11
11
${project.basedir}/../sdk
+ ${project.basedir}/../
@@ -84,10 +85,12 @@
- ${sdk.project.dir}/src/main/resources/schema/artifact-packaged-event.json
-
+ ${parent.project.dir}/spec/schemas/artifactpackaged.json
+ ${sdk.project.dir}/src/main/java
dev.cdevents.models.artifact.packaged
+ false
+ false
@@ -98,25 +101,508 @@
- ${sdk.project.dir}/src/main/resources/schema/artifact-published-event.json
-
+ ${parent.project.dir}/spec/schemas/artifactpublished.json
+ ${sdk.project.dir}/src/main/java
dev.cdevents.models.artifact.published
+ false
+ false
- generate-pipeline-run-finished-from-schema
+ generate-branch-created-from-schema
generate-sources
generate
-
- ${sdk.project.dir}/src/main/resources/schema/pipeline-run-finished-event.json
-
+ ${parent.project.dir}/spec/schemas/branchcreated.json
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.branch.created
+ false
+ false
+
+
+
+ generate-branch-deleted-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/branchdeleted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.branch.deleted
+ false
+ false
+
+
+
+ generate-build-finished-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/buildfinished.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.build.finished
+ false
+ false
+
+
+
+ generate-build-queued-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/buildqueued.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.build.queued
+ false
+ false
+
+
+
+ generate-build-started-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/buildstarted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.build.started
+ false
+ false
+
+
+
+ generate-change-abandoned-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/changeabandoned.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.change.abandoned
+ false
+ false
+
+
+
+ generate-change-created-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/changecreated.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.change.created
+ false
+ false
+
+
+
+ generate-change-merged-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/changemerged.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.change.merged
+ false
+ false
+
+
+
+ generate-change-reviewed-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/changereviewed.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.change.reviewed
+ false
+ false
+
+
+
+ generate-change-updated-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/changeupdated.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.change.updated
+ false
+ false
+
+
+
+ generate-environment-created-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/environmentcreated.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.environment.created
+ false
+ false
+
+
+
+ generate-environment-deleted-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/environmentdeleted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.environment.deleted
+ false
+ false
+
+
+
+ generate-environment-modified-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/environmentmodified.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.environment.modified
+ false
+ false
+
+
+
+ generate-pipelinerun-finished-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/pipelinerunfinished.json
+
+ ${sdk.project.dir}/src/main/java
dev.cdevents.models.pipelinerun.finished
+ false
+ false
+
+
+
+ generate-pipelinerun-queued-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/pipelinerunqueued.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.pipelinerun.queued
+ false
+ false
+
+
+
+ generate-pipelinerun-started-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/pipelinerunstarted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.pipelinerun.started
+ false
+ false
+
+
+
+ generate-repository-created-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/repositorycreated.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.repository.created
+ false
+ false
+
+
+
+ generate-repository-deleted-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/repositorydeleted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.repository.deleted
+ false
+ false
+
+
+
+ generate-repository-modified-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/repositorymodified.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.repository.modified
+ false
+ false
+
+
+
+ generate-service-deployed-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/servicedeployed.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.service.deployed
+ false
+ false
+
+
+
+ generate-service-published-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/servicepublished.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.service.published
+ false
+ false
+
+
+
+ generate-service-removed-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/serviceremoved.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.service.removed
+ false
+ false
+
+
+
+ generate-service-rolledback-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/servicerolledback.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.service.rolledback
+ false
+ false
+
+
+
+ generate-service-upgraded-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/serviceupgraded.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.service.upgraded
+ false
+ false
+
+
+
+ generate-taskrun-finished-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/taskrunfinished.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.taskrun.finished
+ false
+ false
+
+
+
+ generate-taskrun-started-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/taskrunstarted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.taskrun.started
+ false
+ false
+
+
+
+ generate-testcase-finished-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/testcasefinished.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.testcase.finished
+ false
+ false
+
+
+
+ generate-testcase-queued-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/testcasequeued.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.testcase.queued
+ false
+ false
+
+
+
+ generate-testcase-started-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/testcasestarted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.testcase.started
+ false
+ false
+
+
+
+ generate-testsuite-finished-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/testsuitefinished.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.testsuite.finished
+ false
+ false
+
+
+
+ generate-testsuite-started-from-schema
+ generate-sources
+
+ generate
+
+
+
+ ${parent.project.dir}/spec/schemas/testsuitestarted.json
+
+ ${sdk.project.dir}/src/main/java
+ dev.cdevents.models.testsuite.started
+ false
+ false
@@ -137,6 +623,7 @@
${project.basedir}
${sdk.project.dir}
+ ${parent.project.dir}
diff --git a/generator/src/main/java/dev/cdevents/generator/CDEventsGenerator.java b/generator/src/main/java/dev/cdevents/generator/CDEventsGenerator.java
index 4862101..4810199 100644
--- a/generator/src/main/java/dev/cdevents/generator/CDEventsGenerator.java
+++ b/generator/src/main/java/dev/cdevents/generator/CDEventsGenerator.java
@@ -52,9 +52,9 @@ public static void main(String[] args) {
}
String generatorBaseDir = args[0];
String sdkBaseDir = args[1];
+ String parentBaseDir = args[2];
String targetPackageDir = sdkBaseDir + File.separator + "src/main/java/dev/cdevents/events";
- File folder = new File(sdkBaseDir + File.separator + RESOURCES_DIR + "schema");
- System.out.println(folder.toPath().toAbsolutePath());
+ File folder = new File(parentBaseDir + File.separator + "spec" + File.separator + "schemas");
if (folder.isDirectory()) {
File[] files = folder.listFiles((dir, name) -> name.toLowerCase().endsWith(".json"));
if (files != null) {
@@ -68,7 +68,11 @@ public static void main(String[] args) {
SchemaData schemaData = buildCDEventDataFromJsonSchema(file);
generateClassFileFromSchemaData(mustache, schemaData, targetPackageDir);
}
+ } else {
+ log.error("No schema files found in the specified directory {}", folder.getAbsolutePath());
}
+ } else {
+ log.error("No schema directory found in the specified directory {}", folder.getAbsolutePath());
}
}
@@ -94,6 +98,7 @@ private static SchemaData buildCDEventDataFromJsonSchema(File file) {
try {
JsonNode rootNode = objectMapper.readTree(file);
JsonNode contextNode = rootNode.get("properties").get("context").get("properties");
+ String schemaURL = rootNode.get("$id").asText();
String eventType = contextNode.get("type").get("enum").get(0).asText();
log.info("eventType: {}", eventType);
@@ -101,14 +106,11 @@ private static SchemaData buildCDEventDataFromJsonSchema(File file) {
String subject = type[SUBJECT_INDEX];
String predicate = type[PREDICATE_INDEX];
String capitalizedSubject = StringUtils.capitalize(subject);
- if (subject.equals("pipelinerun")) {
- capitalizedSubject = capitalizedSubject.substring(0, SUBSTRING_PIPELINE_INDEX)
- + StringUtils.capitalize(subject.substring(SUBSTRING_PIPELINE_INDEX));
- }
String capitalizedPredicate = StringUtils.capitalize(predicate);
String version = type[VERSION_INDEX];
//set the Schema JsonNode required values to schemaData
+ schemaData.setSchemaURL(schemaURL);
schemaData.setSubject(subject);
schemaData.setPredicate(predicate);
schemaData.setCapitalizedSubject(capitalizedSubject);
diff --git a/generator/src/main/java/dev/cdevents/generator/SchemaData.java b/generator/src/main/java/dev/cdevents/generator/SchemaData.java
index d6c2d5b..5f850f5 100644
--- a/generator/src/main/java/dev/cdevents/generator/SchemaData.java
+++ b/generator/src/main/java/dev/cdevents/generator/SchemaData.java
@@ -17,6 +17,8 @@ public class SchemaData {
private String upperCaseSubject;
private String schemaFileName;
+ private String schemaURL;
+
private List contentFields;
private List contentObjectFields;
@@ -153,6 +155,20 @@ public void setSchemaFileName(String schemaFileName) {
this.schemaFileName = schemaFileName;
}
+ /**
+ * @return schemaURL
+ */
+ public String getSchemaURL() {
+ return schemaURL;
+ }
+
+ /**
+ * @param schemaURL
+ */
+ public void setSchemaURL(String schemaURL) {
+ this.schemaURL = schemaURL;
+ }
+
/**
* @return the Content fields of an event
*/
diff --git a/generator/src/main/resources/template/event-template.mustache b/generator/src/main/resources/template/event-template.mustache
index 9ff38d0..4987904 100644
--- a/generator/src/main/resources/template/event-template.mustache
+++ b/generator/src/main/resources/template/event-template.mustache
@@ -34,7 +34,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
-public class {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent extends {{capitalizedSubject}}{{capitalizedPredicate}}Event implements CDEvent {
+public class {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent extends {{capitalizedSubject}}{{predicate}} implements CDEvent {
/**
@@ -93,8 +93,7 @@ public class {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent extends {{cap
@Override
public String schemaURL() {
- String eventSchemaName = "{{schemaFileName}}".substring(0, "{{schemaFileName}}".lastIndexOf(".json"));
- return String.format("https://cdevents.dev/%s/schema/%s", CDEventConstants.CDEVENTS_SPEC_VERSION, eventSchemaName);
+ return "{{schemaURL}}";
}
diff --git a/pom.xml b/pom.xml
index 171f92a..f6d4aac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -196,7 +196,6 @@
-
publication
diff --git a/sdk/src/main/java/dev/cdevents/constants/CDEventConstants.java b/sdk/src/main/java/dev/cdevents/constants/CDEventConstants.java
index efcfb37..9261cb8 100644
--- a/sdk/src/main/java/dev/cdevents/constants/CDEventConstants.java
+++ b/sdk/src/main/java/dev/cdevents/constants/CDEventConstants.java
@@ -8,7 +8,8 @@ private CDEventConstants() {
/**
* Event JsonSchema files location.
*/
- public static final String SCHEMA_FOLDER = "src/main/resources/schema";
+ public static final String SCHEMA_FOLDER = "../spec/schemas";
+
/**
* Mustache generic event template file.
*/
diff --git a/sdk/src/main/java/dev/cdevents/events/ArtifactPackagedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ArtifactPackagedCDEvent.java
index 404e304..f772f5f 100644
--- a/sdk/src/main/java/dev/cdevents/events/ArtifactPackagedCDEvent.java
+++ b/sdk/src/main/java/dev/cdevents/events/ArtifactPackagedCDEvent.java
@@ -34,7 +34,7 @@
import java.nio.file.Paths;
-public class ArtifactPackagedCDEvent extends ArtifactPackagedEvent implements CDEvent {
+public class ArtifactPackagedCDEvent extends Artifactpackaged implements CDEvent {
/**
@@ -86,24 +86,23 @@ public String currentCDEventType() {
/**
- * @return the artifact-packaged-event.json schema URL
+ * @return the artifactpackaged.json schema URL
*/
@Override
public String schemaURL() {
- String eventSchemaName = "artifact-packaged-event.json".substring(0, "artifact-packaged-event.json".lastIndexOf(".json"));
- return String.format("https://cdevents.dev/%s/schema/%s", CDEventConstants.CDEVENTS_SPEC_VERSION, eventSchemaName);
+ return "https://cdevents.dev/0.1.2/schema/artifact-packaged-event";
}
/**
- * @return the artifact-packaged-event.json schema Json
+ * @return the artifactpackaged.json schema Json
*/
@Override
public String eventSchema() {
try {
- return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/artifact-packaged-event.json"));
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/artifactpackaged.json"));
} catch (IOException e) {
throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
}
diff --git a/sdk/src/main/java/dev/cdevents/events/ArtifactPublishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ArtifactPublishedCDEvent.java
index 914d88b..856e2bb 100644
--- a/sdk/src/main/java/dev/cdevents/events/ArtifactPublishedCDEvent.java
+++ b/sdk/src/main/java/dev/cdevents/events/ArtifactPublishedCDEvent.java
@@ -34,7 +34,7 @@
import java.nio.file.Paths;
-public class ArtifactPublishedCDEvent extends ArtifactPublishedEvent implements CDEvent {
+public class ArtifactPublishedCDEvent extends Artifactpublished implements CDEvent {
/**
@@ -85,24 +85,23 @@ public String currentCDEventType() {
/**
- * @return the artifact-published-event.json schema URL
+ * @return the artifactpublished.json schema URL
*/
@Override
public String schemaURL() {
- String eventSchemaName = "artifact-published-event.json".substring(0, "artifact-published-event.json".lastIndexOf(".json"));
- return String.format("https://cdevents.dev/%s/schema/%s", CDEventConstants.CDEVENTS_SPEC_VERSION, eventSchemaName);
+ return "https://cdevents.dev/0.1.2/schema/artifact-published-event";
}
/**
- * @return the artifact-published-event.json schema Json
+ * @return the artifactpublished.json schema Json
*/
@Override
public String eventSchema() {
try {
- return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/artifact-published-event.json"));
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/artifactpublished.json"));
} catch (IOException e) {
throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
}
diff --git a/sdk/src/main/java/dev/cdevents/events/BranchCreatedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/BranchCreatedCDEvent.java
new file mode 100644
index 0000000..ff78f95
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/BranchCreatedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.branch.created.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class BranchCreatedCDEvent extends Branchcreated implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link BranchCreatedCDEvent}.
+ */
+
+ public BranchCreatedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.BRANCH.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the branchcreated.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/branch-created-event";
+ }
+
+
+ /**
+ * @return the branchcreated.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/branchcreated.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/BranchDeletedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/BranchDeletedCDEvent.java
new file mode 100644
index 0000000..f045560
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/BranchDeletedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.branch.deleted.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class BranchDeletedCDEvent extends Branchdeleted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link BranchDeletedCDEvent}.
+ */
+
+ public BranchDeletedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.BRANCH.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the branchdeleted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/branch-deleted-event";
+ }
+
+
+ /**
+ * @return the branchdeleted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/branchdeleted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/BuildFinishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/BuildFinishedCDEvent.java
new file mode 100644
index 0000000..90a97be
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/BuildFinishedCDEvent.java
@@ -0,0 +1,150 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.build.finished.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class BuildFinishedCDEvent extends Buildfinished implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link BuildFinishedCDEvent}.
+ */
+
+ public BuildFinishedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.BUILD.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the buildfinished.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/build-finished-event";
+ }
+
+
+ /**
+ * @return the buildfinished.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/buildfinished.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param artifactId
+ */
+ public void setSubjectArtifactId(String artifactId) {
+ getSubject().getContent().setArtifactId(artifactId);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/BuildQueuedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/BuildQueuedCDEvent.java
new file mode 100644
index 0000000..d7fede6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/BuildQueuedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.build.queued.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class BuildQueuedCDEvent extends Buildqueued implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link BuildQueuedCDEvent}.
+ */
+
+ public BuildQueuedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.BUILD.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the buildqueued.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/build-queued-event";
+ }
+
+
+ /**
+ * @return the buildqueued.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/buildqueued.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/BuildStartedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/BuildStartedCDEvent.java
new file mode 100644
index 0000000..8b9fd56
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/BuildStartedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.build.started.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class BuildStartedCDEvent extends Buildstarted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link BuildStartedCDEvent}.
+ */
+
+ public BuildStartedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.BUILD.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the buildstarted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/build-started-event";
+ }
+
+
+ /**
+ * @return the buildstarted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/buildstarted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ChangeAbandonedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ChangeAbandonedCDEvent.java
new file mode 100644
index 0000000..336edb2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ChangeAbandonedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.change.abandoned.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ChangeAbandonedCDEvent extends Changeabandoned implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ChangeAbandonedCDEvent}.
+ */
+
+ public ChangeAbandonedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.CHANGE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the changeabandoned.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/change-abandoned-event";
+ }
+
+
+ /**
+ * @return the changeabandoned.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/changeabandoned.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ChangeCreatedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ChangeCreatedCDEvent.java
new file mode 100644
index 0000000..f6bd6b2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ChangeCreatedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.change.created.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ChangeCreatedCDEvent extends Changecreated implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ChangeCreatedCDEvent}.
+ */
+
+ public ChangeCreatedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.CHANGE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the changecreated.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/change-created-event";
+ }
+
+
+ /**
+ * @return the changecreated.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/changecreated.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ChangeMergedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ChangeMergedCDEvent.java
new file mode 100644
index 0000000..5d5db2f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ChangeMergedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.change.merged.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ChangeMergedCDEvent extends Changemerged implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ChangeMergedCDEvent}.
+ */
+
+ public ChangeMergedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.CHANGE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the changemerged.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/change-merged-event";
+ }
+
+
+ /**
+ * @return the changemerged.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/changemerged.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ChangeReviewedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ChangeReviewedCDEvent.java
new file mode 100644
index 0000000..ca4df70
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ChangeReviewedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.change.reviewed.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ChangeReviewedCDEvent extends Changereviewed implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ChangeReviewedCDEvent}.
+ */
+
+ public ChangeReviewedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.CHANGE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the changereviewed.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/change-reviewed-event";
+ }
+
+
+ /**
+ * @return the changereviewed.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/changereviewed.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ChangeUpdatedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ChangeUpdatedCDEvent.java
new file mode 100644
index 0000000..fb1e900
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ChangeUpdatedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.change.updated.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ChangeUpdatedCDEvent extends Changeupdated implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ChangeUpdatedCDEvent}.
+ */
+
+ public ChangeUpdatedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setRepository(new Repository());
+ getSubject().setType(CDEventConstants.SubjectType.CHANGE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the changeupdated.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/change-updated-event";
+ }
+
+
+ /**
+ * @return the changeupdated.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/changeupdated.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectRepositoryId(String id) {
+ getSubject().getContent().getRepository().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectRepositorySource(String source) {
+ getSubject().getContent().getRepository().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/EnvironmentCreatedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/EnvironmentCreatedCDEvent.java
new file mode 100644
index 0000000..b2ecf58
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/EnvironmentCreatedCDEvent.java
@@ -0,0 +1,157 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.environment.created.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class EnvironmentCreatedCDEvent extends Environmentcreated implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link EnvironmentCreatedCDEvent}.
+ */
+
+ public EnvironmentCreatedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.ENVIRONMENT.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the environmentcreated.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/environment-created-event";
+ }
+
+
+ /**
+ * @return the environmentcreated.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/environmentcreated.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/EnvironmentDeletedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/EnvironmentDeletedCDEvent.java
new file mode 100644
index 0000000..a44896a
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/EnvironmentDeletedCDEvent.java
@@ -0,0 +1,150 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.environment.deleted.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class EnvironmentDeletedCDEvent extends Environmentdeleted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link EnvironmentDeletedCDEvent}.
+ */
+
+ public EnvironmentDeletedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.ENVIRONMENT.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the environmentdeleted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/environment-deleted-event";
+ }
+
+
+ /**
+ * @return the environmentdeleted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/environmentdeleted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/EnvironmentModifiedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/EnvironmentModifiedCDEvent.java
new file mode 100644
index 0000000..5e71341
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/EnvironmentModifiedCDEvent.java
@@ -0,0 +1,157 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.environment.modified.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class EnvironmentModifiedCDEvent extends Environmentmodified implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link EnvironmentModifiedCDEvent}.
+ */
+
+ public EnvironmentModifiedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.ENVIRONMENT.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the environmentmodified.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/environment-modified-event";
+ }
+
+
+ /**
+ * @return the environmentmodified.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/environmentmodified.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/PipelineRunFinishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/PipelinerunFinishedCDEvent.java
similarity index 85%
rename from sdk/src/main/java/dev/cdevents/events/PipelineRunFinishedCDEvent.java
rename to sdk/src/main/java/dev/cdevents/events/PipelinerunFinishedCDEvent.java
index 238130c..2fe81d5 100644
--- a/sdk/src/main/java/dev/cdevents/events/PipelineRunFinishedCDEvent.java
+++ b/sdk/src/main/java/dev/cdevents/events/PipelinerunFinishedCDEvent.java
@@ -34,14 +34,14 @@
import java.nio.file.Paths;
-public class PipelineRunFinishedCDEvent extends PipelineRunFinishedEvent implements CDEvent {
+public class PipelinerunFinishedCDEvent extends Pipelinerunfinished implements CDEvent {
/**
- * Constructor to init CDEvent and set the Subject for {@link PipelineRunFinishedCDEvent}.
+ * Constructor to init CDEvent and set the Subject for {@link PipelinerunFinishedCDEvent}.
*/
- public PipelineRunFinishedCDEvent() {
+ public PipelinerunFinishedCDEvent() {
initCDEvent();
}
@@ -85,24 +85,23 @@ public String currentCDEventType() {
/**
- * @return the pipeline-run-finished-event.json schema URL
+ * @return the pipelinerunfinished.json schema URL
*/
@Override
public String schemaURL() {
- String eventSchemaName = "pipeline-run-finished-event.json".substring(0, "pipeline-run-finished-event.json".lastIndexOf(".json"));
- return String.format("https://cdevents.dev/%s/schema/%s", CDEventConstants.CDEVENTS_SPEC_VERSION, eventSchemaName);
+ return "https://cdevents.dev/0.1.2/schema/pipeline-run-finished-event";
}
/**
- * @return the pipeline-run-finished-event.json schema Json
+ * @return the pipelinerunfinished.json schema Json
*/
@Override
public String eventSchema() {
try {
- return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/pipeline-run-finished-event.json"));
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/pipelinerunfinished.json"));
} catch (IOException e) {
throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
}
diff --git a/sdk/src/main/java/dev/cdevents/events/PipelinerunQueuedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/PipelinerunQueuedCDEvent.java
new file mode 100644
index 0000000..889a3c8
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/PipelinerunQueuedCDEvent.java
@@ -0,0 +1,157 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.pipelinerun.queued.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class PipelinerunQueuedCDEvent extends Pipelinerunqueued implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link PipelinerunQueuedCDEvent}.
+ */
+
+ public PipelinerunQueuedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.PIPELINERUN.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the pipelinerunqueued.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/pipeline-run-queued-event";
+ }
+
+
+ /**
+ * @return the pipelinerunqueued.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/pipelinerunqueued.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param pipelineName
+ */
+ public void setSubjectPipelineName(String pipelineName) {
+ getSubject().getContent().setPipelineName(pipelineName);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/PipelinerunStartedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/PipelinerunStartedCDEvent.java
new file mode 100644
index 0000000..0175831
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/PipelinerunStartedCDEvent.java
@@ -0,0 +1,157 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.pipelinerun.started.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class PipelinerunStartedCDEvent extends Pipelinerunstarted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link PipelinerunStartedCDEvent}.
+ */
+
+ public PipelinerunStartedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.PIPELINERUN.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the pipelinerunstarted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/pipeline-run-started-event";
+ }
+
+
+ /**
+ * @return the pipelinerunstarted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/pipelinerunstarted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param pipelineName
+ */
+ public void setSubjectPipelineName(String pipelineName) {
+ getSubject().getContent().setPipelineName(pipelineName);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/RepositoryCreatedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/RepositoryCreatedCDEvent.java
new file mode 100644
index 0000000..e70024f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/RepositoryCreatedCDEvent.java
@@ -0,0 +1,171 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.repository.created.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class RepositoryCreatedCDEvent extends Repositorycreated implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link RepositoryCreatedCDEvent}.
+ */
+
+ public RepositoryCreatedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.REPOSITORY.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the repositorycreated.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/repository-created-event";
+ }
+
+
+ /**
+ * @return the repositorycreated.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/repositorycreated.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+ /**
+ * @param owner
+ */
+ public void setSubjectOwner(String owner) {
+ getSubject().getContent().setOwner(owner);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+ /**
+ * @param viewUrl
+ */
+ public void setSubjectViewUrl(String viewUrl) {
+ getSubject().getContent().setViewUrl(viewUrl);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/RepositoryDeletedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/RepositoryDeletedCDEvent.java
new file mode 100644
index 0000000..2d3d82c
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/RepositoryDeletedCDEvent.java
@@ -0,0 +1,171 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.repository.deleted.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class RepositoryDeletedCDEvent extends Repositorydeleted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link RepositoryDeletedCDEvent}.
+ */
+
+ public RepositoryDeletedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.REPOSITORY.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the repositorydeleted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/repository-deleted-event";
+ }
+
+
+ /**
+ * @return the repositorydeleted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/repositorydeleted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+ /**
+ * @param owner
+ */
+ public void setSubjectOwner(String owner) {
+ getSubject().getContent().setOwner(owner);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+ /**
+ * @param viewUrl
+ */
+ public void setSubjectViewUrl(String viewUrl) {
+ getSubject().getContent().setViewUrl(viewUrl);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/RepositoryModifiedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/RepositoryModifiedCDEvent.java
new file mode 100644
index 0000000..d566125
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/RepositoryModifiedCDEvent.java
@@ -0,0 +1,171 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.repository.modified.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class RepositoryModifiedCDEvent extends Repositorymodified implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link RepositoryModifiedCDEvent}.
+ */
+
+ public RepositoryModifiedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.REPOSITORY.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the repositorymodified.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/repository-modified-event";
+ }
+
+
+ /**
+ * @return the repositorymodified.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/repositorymodified.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param name
+ */
+ public void setSubjectName(String name) {
+ getSubject().getContent().setName(name);
+ }
+
+ /**
+ * @param owner
+ */
+ public void setSubjectOwner(String owner) {
+ getSubject().getContent().setOwner(owner);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+ /**
+ * @param viewUrl
+ */
+ public void setSubjectViewUrl(String viewUrl) {
+ getSubject().getContent().setViewUrl(viewUrl);
+ }
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ServiceDeployedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ServiceDeployedCDEvent.java
new file mode 100644
index 0000000..94fd7fa
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ServiceDeployedCDEvent.java
@@ -0,0 +1,163 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.service.deployed.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ServiceDeployedCDEvent extends Servicedeployed implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ServiceDeployedCDEvent}.
+ */
+
+ public ServiceDeployedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setEnvironment(new Environment());
+ getSubject().setType(CDEventConstants.SubjectType.SERVICE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the servicedeployed.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/service-deployed-event";
+ }
+
+
+ /**
+ * @return the servicedeployed.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/servicedeployed.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param artifactId
+ */
+ public void setSubjectArtifactId(String artifactId) {
+ getSubject().getContent().setArtifactId(artifactId);
+ }
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectEnvironmentId(String id) {
+ getSubject().getContent().getEnvironment().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectEnvironmentSource(String source) {
+ getSubject().getContent().getEnvironment().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ServicePublishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ServicePublishedCDEvent.java
new file mode 100644
index 0000000..26eb496
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ServicePublishedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.service.published.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ServicePublishedCDEvent extends Servicepublished implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ServicePublishedCDEvent}.
+ */
+
+ public ServicePublishedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setEnvironment(new Environment());
+ getSubject().setType(CDEventConstants.SubjectType.SERVICE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the servicepublished.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/service-published-event";
+ }
+
+
+ /**
+ * @return the servicepublished.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/servicepublished.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectEnvironmentId(String id) {
+ getSubject().getContent().getEnvironment().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectEnvironmentSource(String source) {
+ getSubject().getContent().getEnvironment().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ServiceRemovedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ServiceRemovedCDEvent.java
new file mode 100644
index 0000000..dd0c0aa
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ServiceRemovedCDEvent.java
@@ -0,0 +1,156 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.service.removed.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ServiceRemovedCDEvent extends Serviceremoved implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ServiceRemovedCDEvent}.
+ */
+
+ public ServiceRemovedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setEnvironment(new Environment());
+ getSubject().setType(CDEventConstants.SubjectType.SERVICE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the serviceremoved.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/service-removed-event";
+ }
+
+
+ /**
+ * @return the serviceremoved.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/serviceremoved.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectEnvironmentId(String id) {
+ getSubject().getContent().getEnvironment().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectEnvironmentSource(String source) {
+ getSubject().getContent().getEnvironment().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ServiceRolledbackCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ServiceRolledbackCDEvent.java
new file mode 100644
index 0000000..1e4ff69
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ServiceRolledbackCDEvent.java
@@ -0,0 +1,163 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.service.rolledback.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ServiceRolledbackCDEvent extends Servicerolledback implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ServiceRolledbackCDEvent}.
+ */
+
+ public ServiceRolledbackCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setEnvironment(new Environment());
+ getSubject().setType(CDEventConstants.SubjectType.SERVICE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the servicerolledback.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/service-rolledback-event";
+ }
+
+
+ /**
+ * @return the servicerolledback.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/servicerolledback.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param artifactId
+ */
+ public void setSubjectArtifactId(String artifactId) {
+ getSubject().getContent().setArtifactId(artifactId);
+ }
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectEnvironmentId(String id) {
+ getSubject().getContent().getEnvironment().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectEnvironmentSource(String source) {
+ getSubject().getContent().getEnvironment().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/ServiceUpgradedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/ServiceUpgradedCDEvent.java
new file mode 100644
index 0000000..2000944
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/ServiceUpgradedCDEvent.java
@@ -0,0 +1,163 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.service.upgraded.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class ServiceUpgradedCDEvent extends Serviceupgraded implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link ServiceUpgradedCDEvent}.
+ */
+
+ public ServiceUpgradedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setEnvironment(new Environment());
+ getSubject().setType(CDEventConstants.SubjectType.SERVICE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the serviceupgraded.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/service-upgraded-event";
+ }
+
+
+ /**
+ * @return the serviceupgraded.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/serviceupgraded.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param artifactId
+ */
+ public void setSubjectArtifactId(String artifactId) {
+ getSubject().getContent().setArtifactId(artifactId);
+ }
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectEnvironmentId(String id) {
+ getSubject().getContent().getEnvironment().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectEnvironmentSource(String source) {
+ getSubject().getContent().getEnvironment().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TaskrunFinishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TaskrunFinishedCDEvent.java
new file mode 100644
index 0000000..b0fed06
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TaskrunFinishedCDEvent.java
@@ -0,0 +1,184 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.taskrun.finished.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TaskrunFinishedCDEvent extends Taskrunfinished implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TaskrunFinishedCDEvent}.
+ */
+
+ public TaskrunFinishedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setPipelineRun(new PipelineRun());
+ getSubject().setType(CDEventConstants.SubjectType.TASKRUN.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the taskrunfinished.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/task-run-finished-event";
+ }
+
+
+ /**
+ * @return the taskrunfinished.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/taskrunfinished.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param taskName
+ */
+ public void setSubjectTaskName(String taskName) {
+ getSubject().getContent().setTaskName(taskName);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+ /**
+ * @param outcome
+ */
+ public void setSubjectOutcome(String outcome) {
+ getSubject().getContent().setOutcome(outcome);
+ }
+
+ /**
+ * @param errors
+ */
+ public void setSubjectErrors(String errors) {
+ getSubject().getContent().setErrors(errors);
+ }
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectPipelineRunId(String id) {
+ getSubject().getContent().getPipelineRun().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectPipelineRunSource(String source) {
+ getSubject().getContent().getPipelineRun().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TaskrunStartedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TaskrunStartedCDEvent.java
new file mode 100644
index 0000000..22b5824
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TaskrunStartedCDEvent.java
@@ -0,0 +1,170 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.taskrun.started.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TaskrunStartedCDEvent extends Taskrunstarted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TaskrunStartedCDEvent}.
+ */
+
+ public TaskrunStartedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().getContent().setPipelineRun(new PipelineRun());
+ getSubject().setType(CDEventConstants.SubjectType.TASKRUN.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the taskrunstarted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/task-run-started-event";
+ }
+
+
+ /**
+ * @return the taskrunstarted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/taskrunstarted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ /**
+ * @param taskName
+ */
+ public void setSubjectTaskName(String taskName) {
+ getSubject().getContent().setTaskName(taskName);
+ }
+
+ /**
+ * @param url
+ */
+ public void setSubjectUrl(String url) {
+ getSubject().getContent().setUrl(url);
+ }
+
+
+ /**
+ * @param id
+ */
+ public void setSubjectPipelineRunId(String id) {
+ getSubject().getContent().getPipelineRun().setId(id);
+ }
+ /**
+ * @param source
+ */
+ public void setSubjectPipelineRunSource(String source) {
+ getSubject().getContent().getPipelineRun().setSource(source);
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TestcaseFinishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TestcaseFinishedCDEvent.java
new file mode 100644
index 0000000..3efac01
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TestcaseFinishedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.testcase.finished.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TestcaseFinishedCDEvent extends Testcasefinished implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TestcaseFinishedCDEvent}.
+ */
+
+ public TestcaseFinishedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.TESTCASE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the testcasefinished.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/test-case-finished-event";
+ }
+
+
+ /**
+ * @return the testcasefinished.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/testcasefinished.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TestcaseQueuedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TestcaseQueuedCDEvent.java
new file mode 100644
index 0000000..e943414
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TestcaseQueuedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.testcase.queued.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TestcaseQueuedCDEvent extends Testcasequeued implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TestcaseQueuedCDEvent}.
+ */
+
+ public TestcaseQueuedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.TESTCASE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the testcasequeued.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/test-case-queued-event";
+ }
+
+
+ /**
+ * @return the testcasequeued.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/testcasequeued.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TestcaseStartedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TestcaseStartedCDEvent.java
new file mode 100644
index 0000000..c4b953e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TestcaseStartedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.testcase.started.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TestcaseStartedCDEvent extends Testcasestarted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TestcaseStartedCDEvent}.
+ */
+
+ public TestcaseStartedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.TESTCASE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the testcasestarted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/test-case-started-event";
+ }
+
+
+ /**
+ * @return the testcasestarted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/testcasestarted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TestsuiteFinishedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TestsuiteFinishedCDEvent.java
new file mode 100644
index 0000000..48daca2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TestsuiteFinishedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.testsuite.finished.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TestsuiteFinishedCDEvent extends Testsuitefinished implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TestsuiteFinishedCDEvent}.
+ */
+
+ public TestsuiteFinishedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.TESTSUITE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the testsuitefinished.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/test-suite-finished-event";
+ }
+
+
+ /**
+ * @return the testsuitefinished.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/testsuitefinished.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/events/TestsuiteStartedCDEvent.java b/sdk/src/main/java/dev/cdevents/events/TestsuiteStartedCDEvent.java
new file mode 100644
index 0000000..0e99333
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/events/TestsuiteStartedCDEvent.java
@@ -0,0 +1,143 @@
+// Code generated by dev.cdevents.generator.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.testsuite.started.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class TestsuiteStartedCDEvent extends Testsuitestarted implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link TestsuiteStartedCDEvent}.
+ */
+
+ public TestsuiteStartedCDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ getSubject().setType(CDEventConstants.SubjectType.TESTSUITE.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the testsuitestarted.json schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "https://cdevents.dev/0.1.2/schema/test-suite-started-event";
+ }
+
+
+ /**
+ * @return the testsuitestarted.json schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/testsuitestarted.json"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/artifact/packaged/ArtifactPackagedEvent.java b/sdk/src/main/java/dev/cdevents/models/artifact/packaged/Artifactpackaged.java
similarity index 98%
rename from sdk/src/main/java/dev/cdevents/models/artifact/packaged/ArtifactPackagedEvent.java
rename to sdk/src/main/java/dev/cdevents/models/artifact/packaged/Artifactpackaged.java
index 1afae0b..947f03e 100644
--- a/sdk/src/main/java/dev/cdevents/models/artifact/packaged/ArtifactPackagedEvent.java
+++ b/sdk/src/main/java/dev/cdevents/models/artifact/packaged/Artifactpackaged.java
@@ -14,7 +14,7 @@
"customDataContentType"
})
@Generated("jsonschema2pojo")
-public class ArtifactPackagedEvent {
+public class Artifactpackaged {
/**
*
diff --git a/sdk/src/main/java/dev/cdevents/models/artifact/published/ArtifactPublishedEvent.java b/sdk/src/main/java/dev/cdevents/models/artifact/published/Artifactpublished.java
similarity index 98%
rename from sdk/src/main/java/dev/cdevents/models/artifact/published/ArtifactPublishedEvent.java
rename to sdk/src/main/java/dev/cdevents/models/artifact/published/Artifactpublished.java
index bc19088..27d70ed 100644
--- a/sdk/src/main/java/dev/cdevents/models/artifact/published/ArtifactPublishedEvent.java
+++ b/sdk/src/main/java/dev/cdevents/models/artifact/published/Artifactpublished.java
@@ -14,7 +14,7 @@
"customDataContentType"
})
@Generated("jsonschema2pojo")
-public class ArtifactPublishedEvent {
+public class Artifactpublished {
/**
*
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/created/Branchcreated.java b/sdk/src/main/java/dev/cdevents/models/branch/created/Branchcreated.java
new file mode 100644
index 0000000..6b04b8d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/created/Branchcreated.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.branch.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Branchcreated {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/created/Content.java b/sdk/src/main/java/dev/cdevents/models/branch/created/Content.java
new file mode 100644
index 0000000..65f0fb9
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/created/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.branch.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/created/Context.java b/sdk/src/main/java/dev/cdevents/models/branch/created/Context.java
new file mode 100644
index 0000000..aaff507
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/created/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.branch.created;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.branch.created.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_BRANCH_CREATED_0_1_1("dev.cdevents.branch.created.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/created/Repository.java b/sdk/src/main/java/dev/cdevents/models/branch/created/Repository.java
new file mode 100644
index 0000000..61c11fc
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/created/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.branch.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/created/Subject.java b/sdk/src/main/java/dev/cdevents/models/branch/created/Subject.java
new file mode 100644
index 0000000..8a61afc
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/created/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.branch.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/deleted/Branchdeleted.java b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Branchdeleted.java
new file mode 100644
index 0000000..4a802dd
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Branchdeleted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.branch.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Branchdeleted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/deleted/Content.java b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Content.java
new file mode 100644
index 0000000..267f187
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.branch.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/deleted/Context.java b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Context.java
new file mode 100644
index 0000000..ba3ad9a
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.branch.deleted;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.branch.deleted.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_BRANCH_DELETED_0_1_1("dev.cdevents.branch.deleted.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/deleted/Repository.java b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Repository.java
new file mode 100644
index 0000000..a967ba0
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.branch.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/branch/deleted/Subject.java b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Subject.java
new file mode 100644
index 0000000..6d22238
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/branch/deleted/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.branch.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/finished/Buildfinished.java b/sdk/src/main/java/dev/cdevents/models/build/finished/Buildfinished.java
new file mode 100644
index 0000000..42ab74b
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/finished/Buildfinished.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.build.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Buildfinished {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/finished/Content.java b/sdk/src/main/java/dev/cdevents/models/build/finished/Content.java
new file mode 100644
index 0000000..4367f33
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/finished/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.build.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "artifactId"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("artifactId")
+ private String artifactId;
+
+ @JsonProperty("artifactId")
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ @JsonProperty("artifactId")
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/finished/Context.java b/sdk/src/main/java/dev/cdevents/models/build/finished/Context.java
new file mode 100644
index 0000000..cc8ec4c
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/finished/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.build.finished;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.build.finished.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_BUILD_FINISHED_0_1_0("dev.cdevents.build.finished.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/finished/Subject.java b/sdk/src/main/java/dev/cdevents/models/build/finished/Subject.java
new file mode 100644
index 0000000..a0004b5
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/finished/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.build.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/queued/Buildqueued.java b/sdk/src/main/java/dev/cdevents/models/build/queued/Buildqueued.java
new file mode 100644
index 0000000..ca0c6c3
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/queued/Buildqueued.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.build.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Buildqueued {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/queued/Content.java b/sdk/src/main/java/dev/cdevents/models/build/queued/Content.java
new file mode 100644
index 0000000..f0680c6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/queued/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.build.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/queued/Context.java b/sdk/src/main/java/dev/cdevents/models/build/queued/Context.java
new file mode 100644
index 0000000..2abcb54
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/queued/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.build.queued;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.build.queued.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_BUILD_QUEUED_0_1_0("dev.cdevents.build.queued.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/queued/Subject.java b/sdk/src/main/java/dev/cdevents/models/build/queued/Subject.java
new file mode 100644
index 0000000..1fb6705
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/queued/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.build.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/started/Buildstarted.java b/sdk/src/main/java/dev/cdevents/models/build/started/Buildstarted.java
new file mode 100644
index 0000000..d8939ea
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/started/Buildstarted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.build.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Buildstarted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/started/Content.java b/sdk/src/main/java/dev/cdevents/models/build/started/Content.java
new file mode 100644
index 0000000..0f30266
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/started/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.build.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/started/Context.java b/sdk/src/main/java/dev/cdevents/models/build/started/Context.java
new file mode 100644
index 0000000..ef707d6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/started/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.build.started;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.build.started.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_BUILD_STARTED_0_1_0("dev.cdevents.build.started.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java b/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java
new file mode 100644
index 0000000..a71aca1
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.build.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/abandoned/Changeabandoned.java b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Changeabandoned.java
new file mode 100644
index 0000000..ba3b9b6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Changeabandoned.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.change.abandoned;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Changeabandoned {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/abandoned/Content.java b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Content.java
new file mode 100644
index 0000000..eddb630
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.change.abandoned;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/abandoned/Context.java b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Context.java
new file mode 100644
index 0000000..e692c02
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.change.abandoned;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.change.abandoned.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_CHANGE_ABANDONED_0_1_1("dev.cdevents.change.abandoned.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/abandoned/Repository.java b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Repository.java
new file mode 100644
index 0000000..e8c1a64
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.change.abandoned;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/abandoned/Subject.java b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Subject.java
new file mode 100644
index 0000000..4efaf59
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/abandoned/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.change.abandoned;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/created/Changecreated.java b/sdk/src/main/java/dev/cdevents/models/change/created/Changecreated.java
new file mode 100644
index 0000000..79d6117
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/created/Changecreated.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.change.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Changecreated {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/created/Content.java b/sdk/src/main/java/dev/cdevents/models/change/created/Content.java
new file mode 100644
index 0000000..c61510c
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/created/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.change.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/created/Context.java b/sdk/src/main/java/dev/cdevents/models/change/created/Context.java
new file mode 100644
index 0000000..d6afa86
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/created/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.change.created;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.change.created.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_CHANGE_CREATED_0_1_1("dev.cdevents.change.created.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/created/Repository.java b/sdk/src/main/java/dev/cdevents/models/change/created/Repository.java
new file mode 100644
index 0000000..0f72602
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/created/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.change.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/created/Subject.java b/sdk/src/main/java/dev/cdevents/models/change/created/Subject.java
new file mode 100644
index 0000000..19676d8
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/created/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.change.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/merged/Changemerged.java b/sdk/src/main/java/dev/cdevents/models/change/merged/Changemerged.java
new file mode 100644
index 0000000..b66be57
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/merged/Changemerged.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.change.merged;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Changemerged {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/merged/Content.java b/sdk/src/main/java/dev/cdevents/models/change/merged/Content.java
new file mode 100644
index 0000000..879a4a2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/merged/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.change.merged;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/merged/Context.java b/sdk/src/main/java/dev/cdevents/models/change/merged/Context.java
new file mode 100644
index 0000000..90bf035
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/merged/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.change.merged;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.change.merged.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_CHANGE_MERGED_0_1_1("dev.cdevents.change.merged.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/merged/Repository.java b/sdk/src/main/java/dev/cdevents/models/change/merged/Repository.java
new file mode 100644
index 0000000..8ab3a93
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/merged/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.change.merged;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/merged/Subject.java b/sdk/src/main/java/dev/cdevents/models/change/merged/Subject.java
new file mode 100644
index 0000000..2b8a115
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/merged/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.change.merged;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/reviewed/Changereviewed.java b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Changereviewed.java
new file mode 100644
index 0000000..3cb2f73
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Changereviewed.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.change.reviewed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Changereviewed {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/reviewed/Content.java b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Content.java
new file mode 100644
index 0000000..a1f01e3
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.change.reviewed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/reviewed/Context.java b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Context.java
new file mode 100644
index 0000000..e53b02e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.change.reviewed;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.change.reviewed.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_CHANGE_REVIEWED_0_1_1("dev.cdevents.change.reviewed.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/reviewed/Repository.java b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Repository.java
new file mode 100644
index 0000000..4f508bc
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.change.reviewed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/reviewed/Subject.java b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Subject.java
new file mode 100644
index 0000000..97dae89
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/reviewed/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.change.reviewed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/updated/Changeupdated.java b/sdk/src/main/java/dev/cdevents/models/change/updated/Changeupdated.java
new file mode 100644
index 0000000..4b7fbf4
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/updated/Changeupdated.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.change.updated;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Changeupdated {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/updated/Content.java b/sdk/src/main/java/dev/cdevents/models/change/updated/Content.java
new file mode 100644
index 0000000..b7e194e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/updated/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.change.updated;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "repository"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("repository")
+ private Repository repository;
+
+ @JsonProperty("repository")
+ public Repository getRepository() {
+ return repository;
+ }
+
+ @JsonProperty("repository")
+ public void setRepository(Repository repository) {
+ this.repository = repository;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/updated/Context.java b/sdk/src/main/java/dev/cdevents/models/change/updated/Context.java
new file mode 100644
index 0000000..a9cdc8d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/updated/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.change.updated;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.change.updated.0.1.1");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_CHANGE_UPDATED_0_1_1("dev.cdevents.change.updated.0.1.1");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/updated/Repository.java b/sdk/src/main/java/dev/cdevents/models/change/updated/Repository.java
new file mode 100644
index 0000000..ee6f371
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/updated/Repository.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.change.updated;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Repository {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/change/updated/Subject.java b/sdk/src/main/java/dev/cdevents/models/change/updated/Subject.java
new file mode 100644
index 0000000..b9e9a3f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/change/updated/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.change.updated;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/created/Content.java b/sdk/src/main/java/dev/cdevents/models/environment/created/Content.java
new file mode 100644
index 0000000..d4e5089
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/created/Content.java
@@ -0,0 +1,42 @@
+
+package dev.cdevents.models.environment.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name",
+ "url"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("url")
+ private String url;
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/created/Context.java b/sdk/src/main/java/dev/cdevents/models/environment/created/Context.java
new file mode 100644
index 0000000..5c3729e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/created/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.environment.created;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.environment.created.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_ENVIRONMENT_CREATED_0_1_0("dev.cdevents.environment.created.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/created/Environmentcreated.java b/sdk/src/main/java/dev/cdevents/models/environment/created/Environmentcreated.java
new file mode 100644
index 0000000..641adb2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/created/Environmentcreated.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.environment.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Environmentcreated {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/created/Subject.java b/sdk/src/main/java/dev/cdevents/models/environment/created/Subject.java
new file mode 100644
index 0000000..e4dc095
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/created/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.environment.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/deleted/Content.java b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Content.java
new file mode 100644
index 0000000..57d94dc
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.environment.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/deleted/Context.java b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Context.java
new file mode 100644
index 0000000..9140f8f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.environment.deleted;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.environment.deleted.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_ENVIRONMENT_DELETED_0_1_0("dev.cdevents.environment.deleted.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/deleted/Environmentdeleted.java b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Environmentdeleted.java
new file mode 100644
index 0000000..8fd1e3f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Environmentdeleted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.environment.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Environmentdeleted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/deleted/Subject.java b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Subject.java
new file mode 100644
index 0000000..67db9a6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/deleted/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.environment.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/modified/Content.java b/sdk/src/main/java/dev/cdevents/models/environment/modified/Content.java
new file mode 100644
index 0000000..40df7da
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/modified/Content.java
@@ -0,0 +1,42 @@
+
+package dev.cdevents.models.environment.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name",
+ "url"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("url")
+ private String url;
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/modified/Context.java b/sdk/src/main/java/dev/cdevents/models/environment/modified/Context.java
new file mode 100644
index 0000000..28f9dec
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/modified/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.environment.modified;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.environment.modified.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_ENVIRONMENT_MODIFIED_0_1_0("dev.cdevents.environment.modified.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/modified/Environmentmodified.java b/sdk/src/main/java/dev/cdevents/models/environment/modified/Environmentmodified.java
new file mode 100644
index 0000000..365dc65
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/modified/Environmentmodified.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.environment.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Environmentmodified {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/environment/modified/Subject.java b/sdk/src/main/java/dev/cdevents/models/environment/modified/Subject.java
new file mode 100644
index 0000000..6a50c10
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/environment/modified/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.environment.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/PipelineRunFinishedEvent.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/Pipelinerunfinished.java
similarity index 98%
rename from sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/PipelineRunFinishedEvent.java
rename to sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/Pipelinerunfinished.java
index 82f4bb7..f0e41fa 100644
--- a/sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/PipelineRunFinishedEvent.java
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/finished/Pipelinerunfinished.java
@@ -14,7 +14,7 @@
"customDataContentType"
})
@Generated("jsonschema2pojo")
-public class PipelineRunFinishedEvent {
+public class Pipelinerunfinished {
/**
*
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Content.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Content.java
new file mode 100644
index 0000000..00a8def
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Content.java
@@ -0,0 +1,42 @@
+
+package dev.cdevents.models.pipelinerun.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "pipelineName",
+ "url"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("pipelineName")
+ private String pipelineName;
+ @JsonProperty("url")
+ private String url;
+
+ @JsonProperty("pipelineName")
+ public String getPipelineName() {
+ return pipelineName;
+ }
+
+ @JsonProperty("pipelineName")
+ public void setPipelineName(String pipelineName) {
+ this.pipelineName = pipelineName;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Context.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Context.java
new file mode 100644
index 0000000..6da8acf
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.pipelinerun.queued;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.pipelinerun.queued.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_PIPELINERUN_QUEUED_0_1_0("dev.cdevents.pipelinerun.queued.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Pipelinerunqueued.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Pipelinerunqueued.java
new file mode 100644
index 0000000..eef35d9
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Pipelinerunqueued.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.pipelinerun.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Pipelinerunqueued {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Subject.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Subject.java
new file mode 100644
index 0000000..d194c88
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/queued/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.pipelinerun.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Content.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Content.java
new file mode 100644
index 0000000..eadf21a
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Content.java
@@ -0,0 +1,72 @@
+
+package dev.cdevents.models.pipelinerun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "pipelineName",
+ "url"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("pipelineName")
+ private String pipelineName;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ private String url;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("pipelineName")
+ public String getPipelineName() {
+ return pipelineName;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("pipelineName")
+ public void setPipelineName(String pipelineName) {
+ this.pipelineName = pipelineName;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Context.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Context.java
new file mode 100644
index 0000000..13843c4
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.pipelinerun.started;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.pipelinerun.started.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_PIPELINERUN_STARTED_0_1_0("dev.cdevents.pipelinerun.started.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Pipelinerunstarted.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Pipelinerunstarted.java
new file mode 100644
index 0000000..b2098e8
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Pipelinerunstarted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.pipelinerun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Pipelinerunstarted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Subject.java b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Subject.java
new file mode 100644
index 0000000..8442567
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/pipelinerun/started/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.pipelinerun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/created/Content.java b/sdk/src/main/java/dev/cdevents/models/repository/created/Content.java
new file mode 100644
index 0000000..90e39a4
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/created/Content.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.repository.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name",
+ "owner",
+ "url",
+ "viewUrl"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("owner")
+ private String owner;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ private String url;
+ @JsonProperty("viewUrl")
+ private String viewUrl;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @JsonProperty("owner")
+ public String getOwner() {
+ return owner;
+ }
+
+ @JsonProperty("owner")
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @JsonProperty("viewUrl")
+ public String getViewUrl() {
+ return viewUrl;
+ }
+
+ @JsonProperty("viewUrl")
+ public void setViewUrl(String viewUrl) {
+ this.viewUrl = viewUrl;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/created/Context.java b/sdk/src/main/java/dev/cdevents/models/repository/created/Context.java
new file mode 100644
index 0000000..8930f8e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/created/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.repository.created;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.repository.created.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_REPOSITORY_CREATED_0_1_0("dev.cdevents.repository.created.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/created/Repositorycreated.java b/sdk/src/main/java/dev/cdevents/models/repository/created/Repositorycreated.java
new file mode 100644
index 0000000..53756fa
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/created/Repositorycreated.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.repository.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Repositorycreated {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/created/Subject.java b/sdk/src/main/java/dev/cdevents/models/repository/created/Subject.java
new file mode 100644
index 0000000..6c74dbf
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/created/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.repository.created;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/deleted/Content.java b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Content.java
new file mode 100644
index 0000000..36f88ab
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Content.java
@@ -0,0 +1,68 @@
+
+package dev.cdevents.models.repository.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name",
+ "owner",
+ "url",
+ "viewUrl"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("owner")
+ private String owner;
+ @JsonProperty("url")
+ private String url;
+ @JsonProperty("viewUrl")
+ private String viewUrl;
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @JsonProperty("owner")
+ public String getOwner() {
+ return owner;
+ }
+
+ @JsonProperty("owner")
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @JsonProperty("viewUrl")
+ public String getViewUrl() {
+ return viewUrl;
+ }
+
+ @JsonProperty("viewUrl")
+ public void setViewUrl(String viewUrl) {
+ this.viewUrl = viewUrl;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/deleted/Context.java b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Context.java
new file mode 100644
index 0000000..458e6d2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.repository.deleted;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.repository.deleted.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_REPOSITORY_DELETED_0_1_0("dev.cdevents.repository.deleted.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/deleted/Repositorydeleted.java b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Repositorydeleted.java
new file mode 100644
index 0000000..39c2959
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Repositorydeleted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.repository.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Repositorydeleted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/deleted/Subject.java b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Subject.java
new file mode 100644
index 0000000..9648c17
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/deleted/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.repository.deleted;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/modified/Content.java b/sdk/src/main/java/dev/cdevents/models/repository/modified/Content.java
new file mode 100644
index 0000000..e7eefee
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/modified/Content.java
@@ -0,0 +1,68 @@
+
+package dev.cdevents.models.repository.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "name",
+ "owner",
+ "url",
+ "viewUrl"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("name")
+ private String name;
+ @JsonProperty("owner")
+ private String owner;
+ @JsonProperty("url")
+ private String url;
+ @JsonProperty("viewUrl")
+ private String viewUrl;
+
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @JsonProperty("name")
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @JsonProperty("owner")
+ public String getOwner() {
+ return owner;
+ }
+
+ @JsonProperty("owner")
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @JsonProperty("viewUrl")
+ public String getViewUrl() {
+ return viewUrl;
+ }
+
+ @JsonProperty("viewUrl")
+ public void setViewUrl(String viewUrl) {
+ this.viewUrl = viewUrl;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/modified/Context.java b/sdk/src/main/java/dev/cdevents/models/repository/modified/Context.java
new file mode 100644
index 0000000..23d3c42
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/modified/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.repository.modified;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.repository.modified.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_REPOSITORY_MODIFIED_0_1_0("dev.cdevents.repository.modified.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/modified/Repositorymodified.java b/sdk/src/main/java/dev/cdevents/models/repository/modified/Repositorymodified.java
new file mode 100644
index 0000000..b4512ae
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/modified/Repositorymodified.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.repository.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Repositorymodified {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/repository/modified/Subject.java b/sdk/src/main/java/dev/cdevents/models/repository/modified/Subject.java
new file mode 100644
index 0000000..a3d3f78
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/repository/modified/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.repository.modified;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/deployed/Content.java b/sdk/src/main/java/dev/cdevents/models/service/deployed/Content.java
new file mode 100644
index 0000000..6bc1c6f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/deployed/Content.java
@@ -0,0 +1,72 @@
+
+package dev.cdevents.models.service.deployed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "environment",
+ "artifactId"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ private Environment environment;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ private String artifactId;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public Environment getEnvironment() {
+ return environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/deployed/Context.java b/sdk/src/main/java/dev/cdevents/models/service/deployed/Context.java
new file mode 100644
index 0000000..c1df369
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/deployed/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.service.deployed;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.service.deployed.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_SERVICE_DEPLOYED_0_1_0("dev.cdevents.service.deployed.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/deployed/Environment.java b/sdk/src/main/java/dev/cdevents/models/service/deployed/Environment.java
new file mode 100644
index 0000000..4345601
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/deployed/Environment.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.service.deployed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Environment {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/deployed/Servicedeployed.java b/sdk/src/main/java/dev/cdevents/models/service/deployed/Servicedeployed.java
new file mode 100644
index 0000000..ef5b7f6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/deployed/Servicedeployed.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.service.deployed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Servicedeployed {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/deployed/Subject.java b/sdk/src/main/java/dev/cdevents/models/service/deployed/Subject.java
new file mode 100644
index 0000000..d233cd1
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/deployed/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.service.deployed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/published/Content.java b/sdk/src/main/java/dev/cdevents/models/service/published/Content.java
new file mode 100644
index 0000000..787aa31
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/published/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.service.published;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "environment"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("environment")
+ private Environment environment;
+
+ @JsonProperty("environment")
+ public Environment getEnvironment() {
+ return environment;
+ }
+
+ @JsonProperty("environment")
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/published/Context.java b/sdk/src/main/java/dev/cdevents/models/service/published/Context.java
new file mode 100644
index 0000000..29ac6a6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/published/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.service.published;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.service.published.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_SERVICE_PUBLISHED_0_1_0("dev.cdevents.service.published.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/published/Environment.java b/sdk/src/main/java/dev/cdevents/models/service/published/Environment.java
new file mode 100644
index 0000000..fbbff59
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/published/Environment.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.service.published;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Environment {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/published/Servicepublished.java b/sdk/src/main/java/dev/cdevents/models/service/published/Servicepublished.java
new file mode 100644
index 0000000..345455d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/published/Servicepublished.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.service.published;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Servicepublished {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/published/Subject.java b/sdk/src/main/java/dev/cdevents/models/service/published/Subject.java
new file mode 100644
index 0000000..810a558
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/published/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.service.published;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/removed/Content.java b/sdk/src/main/java/dev/cdevents/models/service/removed/Content.java
new file mode 100644
index 0000000..87aafdc
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/removed/Content.java
@@ -0,0 +1,29 @@
+
+package dev.cdevents.models.service.removed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "environment"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("environment")
+ private Environment environment;
+
+ @JsonProperty("environment")
+ public Environment getEnvironment() {
+ return environment;
+ }
+
+ @JsonProperty("environment")
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/removed/Context.java b/sdk/src/main/java/dev/cdevents/models/service/removed/Context.java
new file mode 100644
index 0000000..c61250e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/removed/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.service.removed;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.service.removed.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_SERVICE_REMOVED_0_1_0("dev.cdevents.service.removed.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/removed/Environment.java b/sdk/src/main/java/dev/cdevents/models/service/removed/Environment.java
new file mode 100644
index 0000000..ceb878c
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/removed/Environment.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.service.removed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Environment {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/removed/Serviceremoved.java b/sdk/src/main/java/dev/cdevents/models/service/removed/Serviceremoved.java
new file mode 100644
index 0000000..f6af8b6
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/removed/Serviceremoved.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.service.removed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Serviceremoved {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/removed/Subject.java b/sdk/src/main/java/dev/cdevents/models/service/removed/Subject.java
new file mode 100644
index 0000000..b2c0cf9
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/removed/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.service.removed;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/rolledback/Content.java b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Content.java
new file mode 100644
index 0000000..dee2cc5
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Content.java
@@ -0,0 +1,72 @@
+
+package dev.cdevents.models.service.rolledback;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "environment",
+ "artifactId"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ private Environment environment;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ private String artifactId;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public Environment getEnvironment() {
+ return environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/rolledback/Context.java b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Context.java
new file mode 100644
index 0000000..7fb7c7e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.service.rolledback;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.service.rolledback.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_SERVICE_ROLLEDBACK_0_1_0("dev.cdevents.service.rolledback.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/rolledback/Environment.java b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Environment.java
new file mode 100644
index 0000000..78c5c10
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Environment.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.service.rolledback;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Environment {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/rolledback/Servicerolledback.java b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Servicerolledback.java
new file mode 100644
index 0000000..da79bf1
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Servicerolledback.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.service.rolledback;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Servicerolledback {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/rolledback/Subject.java b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Subject.java
new file mode 100644
index 0000000..87d1722
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/rolledback/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.service.rolledback;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/upgraded/Content.java b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Content.java
new file mode 100644
index 0000000..19b546d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Content.java
@@ -0,0 +1,72 @@
+
+package dev.cdevents.models.service.upgraded;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "environment",
+ "artifactId"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ private Environment environment;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ private String artifactId;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public Environment getEnvironment() {
+ return environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("environment")
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("artifactId")
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/upgraded/Context.java b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Context.java
new file mode 100644
index 0000000..c3a5a88
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.service.upgraded;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.service.upgraded.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_SERVICE_UPGRADED_0_1_0("dev.cdevents.service.upgraded.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/upgraded/Environment.java b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Environment.java
new file mode 100644
index 0000000..c3aed02
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Environment.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.service.upgraded;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class Environment {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/upgraded/Serviceupgraded.java b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Serviceupgraded.java
new file mode 100644
index 0000000..ed9d7e2
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Serviceupgraded.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.service.upgraded;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Serviceupgraded {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/service/upgraded/Subject.java b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Subject.java
new file mode 100644
index 0000000..b1aa05c
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/service/upgraded/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.service.upgraded;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Content.java b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Content.java
new file mode 100644
index 0000000..a317206
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Content.java
@@ -0,0 +1,81 @@
+
+package dev.cdevents.models.taskrun.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "taskName",
+ "url",
+ "pipelineRun",
+ "outcome",
+ "errors"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("taskName")
+ private String taskName;
+ @JsonProperty("url")
+ private String url;
+ @JsonProperty("pipelineRun")
+ private PipelineRun pipelineRun;
+ @JsonProperty("outcome")
+ private String outcome;
+ @JsonProperty("errors")
+ private String errors;
+
+ @JsonProperty("taskName")
+ public String getTaskName() {
+ return taskName;
+ }
+
+ @JsonProperty("taskName")
+ public void setTaskName(String taskName) {
+ this.taskName = taskName;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @JsonProperty("pipelineRun")
+ public PipelineRun getPipelineRun() {
+ return pipelineRun;
+ }
+
+ @JsonProperty("pipelineRun")
+ public void setPipelineRun(PipelineRun pipelineRun) {
+ this.pipelineRun = pipelineRun;
+ }
+
+ @JsonProperty("outcome")
+ public String getOutcome() {
+ return outcome;
+ }
+
+ @JsonProperty("outcome")
+ public void setOutcome(String outcome) {
+ this.outcome = outcome;
+ }
+
+ @JsonProperty("errors")
+ public String getErrors() {
+ return errors;
+ }
+
+ @JsonProperty("errors")
+ public void setErrors(String errors) {
+ this.errors = errors;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Context.java b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Context.java
new file mode 100644
index 0000000..d86a725
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.taskrun.finished;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.taskrun.finished.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TASKRUN_FINISHED_0_1_0("dev.cdevents.taskrun.finished.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/finished/PipelineRun.java b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/PipelineRun.java
new file mode 100644
index 0000000..e9da7b4
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/PipelineRun.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.taskrun.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class PipelineRun {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Subject.java b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Subject.java
new file mode 100644
index 0000000..c6c6101
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.taskrun.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Taskrunfinished.java b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Taskrunfinished.java
new file mode 100644
index 0000000..6293729
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/finished/Taskrunfinished.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.taskrun.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Taskrunfinished {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/started/Content.java b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Content.java
new file mode 100644
index 0000000..0961328
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Content.java
@@ -0,0 +1,55 @@
+
+package dev.cdevents.models.taskrun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "taskName",
+ "url",
+ "pipelineRun"
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+ @JsonProperty("taskName")
+ private String taskName;
+ @JsonProperty("url")
+ private String url;
+ @JsonProperty("pipelineRun")
+ private PipelineRun pipelineRun;
+
+ @JsonProperty("taskName")
+ public String getTaskName() {
+ return taskName;
+ }
+
+ @JsonProperty("taskName")
+ public void setTaskName(String taskName) {
+ this.taskName = taskName;
+ }
+
+ @JsonProperty("url")
+ public String getUrl() {
+ return url;
+ }
+
+ @JsonProperty("url")
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ @JsonProperty("pipelineRun")
+ public PipelineRun getPipelineRun() {
+ return pipelineRun;
+ }
+
+ @JsonProperty("pipelineRun")
+ public void setPipelineRun(PipelineRun pipelineRun) {
+ this.pipelineRun = pipelineRun;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/started/Context.java b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Context.java
new file mode 100644
index 0000000..3111aec
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.taskrun.started;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.taskrun.started.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TASKRUN_STARTED_0_1_0("dev.cdevents.taskrun.started.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/started/PipelineRun.java b/sdk/src/main/java/dev/cdevents/models/taskrun/started/PipelineRun.java
new file mode 100644
index 0000000..4cc0dfe
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/started/PipelineRun.java
@@ -0,0 +1,57 @@
+
+package dev.cdevents.models.taskrun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source"
+})
+@Generated("jsonschema2pojo")
+public class PipelineRun {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/started/Subject.java b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Subject.java
new file mode 100644
index 0000000..9e40de7
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.taskrun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/taskrun/started/Taskrunstarted.java b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Taskrunstarted.java
new file mode 100644
index 0000000..781d39d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/taskrun/started/Taskrunstarted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.taskrun.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Taskrunstarted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/finished/Content.java b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Content.java
new file mode 100644
index 0000000..c161a80
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.testcase.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/finished/Context.java b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Context.java
new file mode 100644
index 0000000..8ae7c42
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.testcase.finished;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.testcase.finished.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TESTCASE_FINISHED_0_1_0("dev.cdevents.testcase.finished.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/finished/Subject.java b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Subject.java
new file mode 100644
index 0000000..2d2f7bb
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.testcase.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/finished/Testcasefinished.java b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Testcasefinished.java
new file mode 100644
index 0000000..5bc60bf
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/finished/Testcasefinished.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.testcase.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Testcasefinished {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/queued/Content.java b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Content.java
new file mode 100644
index 0000000..47db12b
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.testcase.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/queued/Context.java b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Context.java
new file mode 100644
index 0000000..8c87481
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.testcase.queued;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.testcase.queued.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TESTCASE_QUEUED_0_1_0("dev.cdevents.testcase.queued.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/queued/Subject.java b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Subject.java
new file mode 100644
index 0000000..57fbb7e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.testcase.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/queued/Testcasequeued.java b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Testcasequeued.java
new file mode 100644
index 0000000..d129a52
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/queued/Testcasequeued.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.testcase.queued;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Testcasequeued {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/started/Content.java b/sdk/src/main/java/dev/cdevents/models/testcase/started/Content.java
new file mode 100644
index 0000000..be3921e
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/started/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.testcase.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/started/Context.java b/sdk/src/main/java/dev/cdevents/models/testcase/started/Context.java
new file mode 100644
index 0000000..7f4931f
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/started/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.testcase.started;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.testcase.started.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TESTCASE_STARTED_0_1_0("dev.cdevents.testcase.started.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/started/Subject.java b/sdk/src/main/java/dev/cdevents/models/testcase/started/Subject.java
new file mode 100644
index 0000000..969dc51
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/started/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.testcase.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testcase/started/Testcasestarted.java b/sdk/src/main/java/dev/cdevents/models/testcase/started/Testcasestarted.java
new file mode 100644
index 0000000..5c66ef3
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testcase/started/Testcasestarted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.testcase.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Testcasestarted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Content.java b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Content.java
new file mode 100644
index 0000000..b34658d
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.testsuite.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Context.java b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Context.java
new file mode 100644
index 0000000..aa37775
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.testsuite.finished;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.testsuite.finished.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TESTSUITE_FINISHED_0_1_0("dev.cdevents.testsuite.finished.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Subject.java b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Subject.java
new file mode 100644
index 0000000..82aa072
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.testsuite.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Testsuitefinished.java b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Testsuitefinished.java
new file mode 100644
index 0000000..6e7c5ec
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/finished/Testsuitefinished.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.testsuite.finished;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Testsuitefinished {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/started/Content.java b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Content.java
new file mode 100644
index 0000000..d0eeae9
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Content.java
@@ -0,0 +1,16 @@
+
+package dev.cdevents.models.testsuite.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+
+})
+@Generated("jsonschema2pojo")
+public class Content {
+
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/started/Context.java b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Context.java
new file mode 100644
index 0000000..de867cf
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Context.java
@@ -0,0 +1,200 @@
+
+package dev.cdevents.models.testsuite.started;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "version",
+ "id",
+ "source",
+ "type",
+ "timestamp"
+})
+@Generated("jsonschema2pojo")
+public class Context {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ private String version;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private Context.Type type = Context.Type.fromValue("dev.cdevents.testsuite.started.0.1.0");
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ private Date timestamp;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public Context.Type getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(Context.Type type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("timestamp")
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ @Generated("jsonschema2pojo")
+ public enum Type {
+
+ DEV_CDEVENTS_TESTSUITE_STARTED_0_1_0("dev.cdevents.testsuite.started.0.1.0");
+ private final String value;
+ private final static Map CONSTANTS = new HashMap();
+
+ static {
+ for (Context.Type c: values()) {
+ CONSTANTS.put(c.value, c);
+ }
+ }
+
+ Type(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return this.value;
+ }
+
+ @JsonValue
+ public String value() {
+ return this.value;
+ }
+
+ @JsonCreator
+ public static Context.Type fromValue(String value) {
+ Context.Type constant = CONSTANTS.get(value);
+ if (constant == null) {
+ throw new IllegalArgumentException(value);
+ } else {
+ return constant;
+ }
+ }
+
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/started/Subject.java b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Subject.java
new file mode 100644
index 0000000..8c40ec1
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Subject.java
@@ -0,0 +1,113 @@
+
+package dev.cdevents.models.testsuite.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "id",
+ "source",
+ "type",
+ "content"
+})
+@Generated("jsonschema2pojo")
+public class Subject {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ private String id;
+ @JsonProperty("source")
+ private String source;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ private String type;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ private Content content;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("id")
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @JsonProperty("source")
+ public String getSource() {
+ return source;
+ }
+
+ @JsonProperty("source")
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public Content getContent() {
+ return content;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("content")
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+}
diff --git a/sdk/src/main/java/dev/cdevents/models/testsuite/started/Testsuitestarted.java b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Testsuitestarted.java
new file mode 100644
index 0000000..baefc97
--- /dev/null
+++ b/sdk/src/main/java/dev/cdevents/models/testsuite/started/Testsuitestarted.java
@@ -0,0 +1,98 @@
+
+package dev.cdevents.models.testsuite.started;
+
+import javax.annotation.processing.Generated;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "context",
+ "subject",
+ "customData",
+ "customDataContentType"
+})
+@Generated("jsonschema2pojo")
+public class Testsuitestarted {
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ private Context context;
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ private Subject subject;
+ @JsonProperty("customData")
+ private Object customData;
+ @JsonProperty("customDataContentType")
+ private String customDataContentType;
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public Context getContext() {
+ return context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("context")
+ public void setContext(Context context) {
+ this.context = context;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public Subject getSubject() {
+ return subject;
+ }
+
+ /**
+ *
+ * (Required)
+ *
+ */
+ @JsonProperty("subject")
+ public void setSubject(Subject subject) {
+ this.subject = subject;
+ }
+
+ @JsonProperty("customData")
+ public Object getCustomData() {
+ return customData;
+ }
+
+ @JsonProperty("customData")
+ public void setCustomData(Object customData) {
+ this.customData = customData;
+ }
+
+ @JsonProperty("customDataContentType")
+ public String getCustomDataContentType() {
+ return customDataContentType;
+ }
+
+ @JsonProperty("customDataContentType")
+ public void setCustomDataContentType(String customDataContentType) {
+ this.customDataContentType = customDataContentType;
+ }
+
+}
diff --git a/sdk/src/main/resources/template/event-template.mustache b/sdk/src/main/resources/template/event-template.mustache
new file mode 100644
index 0000000..92b3ffc
--- /dev/null
+++ b/sdk/src/main/resources/template/event-template.mustache
@@ -0,0 +1,163 @@
+// Code generated by dev.cdevents.CDEventsGenerator. DO NOT EDIT.
+
+/*
+Copyright 2023 The CDEvents Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+SPDX-License-Identifier: Apache-2.0
+*/
+
+package dev.cdevents.events;
+
+
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.exception.CDEventsException;
+import dev.cdevents.models.CDEvent;
+import dev.cdevents.models.{{subject}}.{{predicate}}.*;
+
+import java.net.URI;
+import java.util.Date;
+import java.util.UUID;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+
+public class {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent extends {{capitalizedSubject}}{{predicate}} implements CDEvent {
+
+
+ /**
+ * Constructor to init CDEvent and set the Subject for {@link {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent}.
+ */
+
+ public {{capitalizedSubject}}{{capitalizedPredicate}}CDEvent() {
+ initCDEvent();
+ }
+
+
+ /**
+ * Initialize the CDEvent with the context values.
+ */
+
+ @Override
+ public void initCDEvent() {
+ setContext(new Context());
+ setSubject(new Subject());
+ setCustomData(new Object());
+ setCustomDataContentType("application/json");
+ Context context = getContext();
+ context.setId(UUID.randomUUID().toString());
+ context.setTimestamp(new Date());
+ context.setVersion(CDEventConstants.CDEVENTS_SPEC_VERSION);
+ getSubject().setContent(new Content());
+ {{#getCapitalizedObjectName}}
+ getSubject().getContent().set{{capitalizedObjectName}}(new {{capitalizedObjectName}}());
+ {{/getCapitalizedObjectName}}
+ getSubject().setType(CDEventConstants.SubjectType.{{upperCaseSubject}}.getSubjectType());
+ }
+
+ /**
+ * @return the event source
+ */
+
+ @Override
+ public String eventSource() {
+ return getContext().getSource();
+ }
+
+
+ /**
+ * @return the current CDEvent type
+ */
+
+ @Override
+ public String currentCDEventType() {
+ return getContext().getType().value();
+ }
+
+
+ /**
+ * @return the {{schemaFileName}} schema URL
+ */
+
+ @Override
+ public String schemaURL() {
+ return "{{schemaURL}}";
+ }
+
+
+ /**
+ * @return the {{schemaFileName}} schema Json
+ */
+
+ @Override
+ public String eventSchema() {
+ try {
+ return Files.readString(Paths.get(CDEventConstants.SCHEMA_FOLDER + "/{{schemaFileName}}"));
+ } catch (IOException e) {
+ throw new CDEventsException("Exception while reading Event JsonSchema file ", e);
+ }
+ }
+
+
+ /**
+ * @param source
+ * Sets the {@link Context} source value
+ */
+
+ public void setSource(URI source) {
+ getContext().setSource(source.toString());
+ }
+
+
+ /**
+ * @param subjectId
+ * sets the subject Id
+ */
+
+ public void setSubjectId(String subjectId) {
+ getSubject().setId(subjectId);
+ }
+
+
+ /**
+ * @param subjectSource
+ * sets the subject source
+ */
+
+ public void setSubjectSource(URI subjectSource) {
+ getSubject().setSource(subjectSource.toString());
+ }
+
+
+ {{#getContentFields}}
+ /**
+ * @param {{fieldName}}
+ */
+ public void setSubject{{capitalizedFieldName}}({{dataType}} {{fieldName}}) {
+ getSubject().getContent().set{{capitalizedFieldName}}({{fieldName}});
+ }
+
+ {{/getContentFields}}
+
+ {{#getContentObjectFields}}
+ /**
+ * @param {{fieldName}}
+ */
+ public void setSubject{{capitalizedObjectName}}{{capitalizedFieldName}}({{dataType}} {{fieldName}}) {
+ getSubject().getContent().get{{capitalizedObjectName}}().set{{capitalizedFieldName}}({{fieldName}});
+ }
+ {{/getContentObjectFields}}
+
+}
diff --git a/sdk/src/test/java/dev/cdevents/CDEventTest.java b/sdk/src/test/java/dev/cdevents/CDEventTest.java
deleted file mode 100644
index 2f01485..0000000
--- a/sdk/src/test/java/dev/cdevents/CDEventTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package dev.cdevents;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import dev.cdevents.config.CustomObjectMapper;
-import dev.cdevents.constants.CDEventConstants;
-import dev.cdevents.events.ArtifactPackagedCDEvent;
-import dev.cdevents.events.ArtifactPublishedCDEvent;
-import dev.cdevents.events.PipelineRunFinishedCDEvent;
-import dev.cdevents.exception.CDEventsException;
-import io.cloudevents.CloudEvent;
-import org.junit.jupiter.api.Test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.nio.charset.StandardCharsets;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.jupiter.api.Assertions.*;
-
-public class CDEventTest {
-
- private static ObjectMapper objectMapper = new CustomObjectMapper().customConfiguration();
-
- @Test
- void createPipelineRunFinishedEventAsCloudEvent() {
- PipelineRunFinishedCDEvent cdEvent = new PipelineRunFinishedCDEvent();
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- cdEvent.setSubjectId("/dev/pipeline/run/subject");
- cdEvent.setSubjectSource(URI.create("/dev/pipeline/run/subject"));
- cdEvent.setSubjectPipelineName("Name-pipeline");
- cdEvent.setSubjectUrl(URI.create("http://dev/pipeline/url").toString());
- cdEvent.setSubjectErrors("errors to place");
- cdEvent.setSubjectOutcome(CDEventConstants.Outcome.SUCCESS.getOutcome());
-
- String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
-
- CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
-
- String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
-
- assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
- assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
- assertThat(ceDataJson).isEqualTo(cdEventJson);
-
- }
-
- @Test
- void createPipelineRunFinishedEventOptionalFieldsUnset() throws IOException {
- InputStream inputStream = getClass().getResourceAsStream("/pipelinerun_finished_optional.json");
-
- JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
- JsonNode expectedContextNode = expectedJsonNode.get("context");
- JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
-
- PipelineRunFinishedCDEvent cdEvent = new PipelineRunFinishedCDEvent();
- cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
- cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
-
- String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
- JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
- JsonNode cdEventContextNode = cdEventJsonNode.get("context");
- JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
-
- //validates CDEvent against schema
- assertTrue(CDEvents.validateCDEvent(cdEvent));
-
- //assert context and subject mandatory fields
- assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
- assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
- assertEquals(expectedSubjectNode, cdEventSubjectNode);
- assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
- assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
-
- //assert Optional field Subject Source, Content pipelineName, url, outcome, errors are set to null
- assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
- assertThat(expectedSubjectNode.get("content").get("pipelineName")).isEqualTo(null);
- assertThat(expectedSubjectNode.get("content").get("url")).isEqualTo(null);
- assertThat(expectedSubjectNode.get("content").get("outcome")).isEqualTo(null);
- assertThat(expectedSubjectNode.get("content").get("errors")).isEqualTo(null);
-
- }
-
- @Test
- void testInvalidPipelineRunFinishedEventWithNoSubject() {
- PipelineRunFinishedCDEvent cdEvent = new PipelineRunFinishedCDEvent();
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- Exception exception = assertThrows(CDEventsException.class, () -> {
- CDEvents.cdEventAsCloudEvent(cdEvent);
- });
- String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
- assertThat(exception.getMessage()).isEqualTo(expectedError);
- }
- @Test
- void createArtifactPackagedEventAsCloudEvent() {
-
- ArtifactPackagedCDEvent cdEvent = new ArtifactPackagedCDEvent();
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- cdEvent.setSubjectId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b");
- cdEvent.setSubjectSource(URI.create("/dev/artifact/source"));
-
- cdEvent.setSubjectChangeId("test-feature");
- cdEvent.setSubjectChangeSource(URI.create("/github.com/test-repo").toString());
-
- String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
-
- CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
-
- String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
-
- assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
- assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
- assertThat(ceDataJson).isEqualTo(cdEventJson);
- }
-
- @Test
- void testInvalidArtifactPackagedEventWithNoSubject() {
- ArtifactPackagedCDEvent cdEvent = new ArtifactPackagedCDEvent();
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- Exception exception = assertThrows(CDEventsException.class, () -> {
- CDEvents.cdEventAsCloudEvent(cdEvent);
- });
- String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
-
- assertThat(exception.getMessage()).isEqualTo(expectedError);
- }
-
- @Test
- void createArtifactPublishedEventAsCloudEvent() {
- ArtifactPublishedCDEvent cdEvent = new ArtifactPublishedCDEvent();
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- cdEvent.setSubjectId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b");
- cdEvent.setSubjectSource(URI.create("/dev/artifact/source"));
-
- String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
-
- CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
-
- String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
-
- assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
- assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
- assertThat(ceDataJson).isEqualTo(cdEventJson);
-
- }
-
- @Test
- void testInvalidArtifactPublishedEventWithNoSubject() {
- ArtifactPublishedCDEvent cdEvent = new ArtifactPublishedCDEvent();
-
- cdEvent.setSource(URI.create("http://dev.cdevents"));
-
- Exception exception = assertThrows(CDEventsException.class, () -> {
- CDEvents.cdEventAsCloudEvent(cdEvent);
- });
- String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
-
- assertThat(exception.getMessage()).isEqualTo(expectedError);
- }
-}
diff --git a/sdk/src/test/java/dev/cdevents/CDEventsTest.java b/sdk/src/test/java/dev/cdevents/CDEventsTest.java
new file mode 100644
index 0000000..a924f0c
--- /dev/null
+++ b/sdk/src/test/java/dev/cdevents/CDEventsTest.java
@@ -0,0 +1,1385 @@
+package dev.cdevents;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.packageurl.MalformedPackageURLException;
+import com.github.packageurl.PackageURL;
+import dev.cdevents.config.CustomObjectMapper;
+import dev.cdevents.constants.CDEventConstants;
+import dev.cdevents.events.*;
+import dev.cdevents.exception.CDEventsException;
+import io.cloudevents.CloudEvent;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.*;
+
+public class CDEventsTest {
+
+ private static ObjectMapper objectMapper = new CustomObjectMapper().customConfiguration();
+
+ @Test
+ void createPipelineRunFinishedEventAsCloudEvent() throws IOException {
+ PipelinerunFinishedCDEvent cdEvent = new PipelinerunFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/pipeline/run/subject"));
+ cdEvent.setSubjectPipelineName("Name-pipeline");
+ cdEvent.setSubjectUrl("http://dev/pipeline/url");
+ cdEvent.setSubjectErrors("errors to place");
+ cdEvent.setSubjectOutcome(CDEventConstants.Outcome.SUCCESS.getOutcome());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+
+ }
+
+ @Test
+ void createPipelineRunFinishedEventOptionalFieldsUnset() throws IOException {
+ InputStream inputStream = getClass().getResourceAsStream("/pipelinerun_finished_optional.json");
+
+ JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
+ JsonNode expectedContextNode = expectedJsonNode.get("context");
+ JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
+
+ PipelinerunFinishedCDEvent cdEvent = new PipelinerunFinishedCDEvent();
+ cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
+ cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+ JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
+ JsonNode cdEventContextNode = cdEventJsonNode.get("context");
+ JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
+
+ //validates CDEvent against schema
+ assertTrue(CDEvents.validateCDEvent(cdEvent));
+
+ //assert context and subject mandatory fields
+ assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
+ assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
+ assertEquals(expectedSubjectNode, cdEventSubjectNode);
+ assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
+ assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
+
+ //assert Optional field Subject Source, Content pipelineName, url, outcome, errors are set to null
+ assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("pipelineName")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("url")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("outcome")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("errors")).isEqualTo(null);
+
+ }
+
+ @Test
+ void testInvalidPipelineRunFinishedEventWithNoSubject() {
+ PipelinerunFinishedCDEvent cdEvent = new PipelinerunFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createPipelineRunQueuedEventAsCloudEvent() {
+
+ PipelinerunQueuedCDEvent cdEvent = new PipelinerunQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/pipeline/run/subject"));
+ cdEvent.setSubjectPipelineName("test-pipeline-queued");
+ cdEvent.setSubjectUrl("http://dev/pipeline/url");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+
+ }
+
+ @Test
+ void testInvalidPipelineRunQueuedEventWithNoSubject() {
+ PipelinerunQueuedCDEvent cdEvent = new PipelinerunQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createPipelineRunQueuedEventWithOptionalFieldsUnset() throws IOException {
+ InputStream inputStream = getClass().getResourceAsStream("/pipelinerun_queued_optional.json");
+
+ JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
+ JsonNode expectedContextNode = expectedJsonNode.get("context");
+ JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
+
+ PipelinerunQueuedCDEvent cdEvent = new PipelinerunQueuedCDEvent();
+ cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
+ cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+ JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
+ JsonNode cdEventContextNode = cdEventJsonNode.get("context");
+ JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
+
+ //validates CDEvent against schema
+ assertTrue(CDEvents.validateCDEvent(cdEvent));
+
+ //assert context and subject mandatory fields
+ assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
+ assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
+ assertEquals(expectedSubjectNode, cdEventSubjectNode);
+ assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
+ assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
+
+ //assert Optional field Subject Source, pipelineName, url is set to null
+ assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("pipelineName")).isEqualTo(null);
+ assertThat(expectedSubjectNode.get("content").get("url")).isEqualTo(null);
+
+
+ }
+
+ @Test
+ void testPipelineRunQueuedEventWithCustomData() throws JsonProcessingException {
+ PipelinerunQueuedCDEvent cdEvent = new PipelinerunQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/pipeline/run/subject"));
+ cdEvent.setSubjectPipelineName("test-pipeline-queued");
+ cdEvent.setSubjectUrl("http://dev/pipeline/url");
+
+ String customDataJson = "{\"key1\": \"value1\",\"key2\" : {\"test\": \"customData\" }}";
+ cdEvent.setCustomData(customDataJson);
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void createPipelineRunStartedEventAsCloudEvent() {
+
+ PipelinerunStartedCDEvent cdEvent = new PipelinerunStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/pipeline/run/subject"));
+ cdEvent.setSubjectPipelineName("test-pipeline-started");
+ cdEvent.setSubjectUrl("http://dev/pipeline/url");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+
+ }
+
+ @Test
+ void testInvalidPipelineRunStartedEventWithNoSubject() {
+ PipelinerunStartedCDEvent cdEvent = new PipelinerunStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createPipelineRunStartedJsonEventWithOptionalFieldsUnset() throws IOException {
+
+ InputStream inputStream = getClass().getResourceAsStream("/pipelinerun_started_optional.json");
+
+ JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
+ JsonNode expectedContextNode = expectedJsonNode.get("context");
+ JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
+
+ PipelinerunStartedCDEvent cdEvent = new PipelinerunStartedCDEvent();
+ cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
+
+ cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
+ cdEvent.setSubjectPipelineName(expectedSubjectNode.get("content").get("pipelineName").asText());
+ cdEvent.setSubjectUrl(expectedSubjectNode.get("content").get("url").asText());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+ JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
+ JsonNode cdEventContextNode = cdEventJsonNode.get("context");
+ JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
+
+ //validates CDEvent against schema
+ assertTrue(CDEvents.validateCDEvent(cdEvent));
+
+ //assert context and subject mandatory fields
+ assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
+ assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
+ assertEquals(expectedSubjectNode, cdEventSubjectNode);
+ assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
+ assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
+ assertThat(cdEventSubjectNode.get("content").get("pipelineName").asText()).isEqualTo(expectedSubjectNode.get("content").get("pipelineName").asText());
+ assertThat(cdEventSubjectNode.get("content").get("url").asText()).isEqualTo(expectedSubjectNode.get("content").get("url").asText());
+
+ //assert Optional field Subject Source is set to null
+ assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
+
+ }
+
+
+ @Test
+ void createTaskRunStartedEventAsCloudEvent() {
+
+ TaskrunStartedCDEvent cdEvent = new TaskrunStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/task/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/task/run/subject"));
+ cdEvent.setSubjectTaskName("test-task-started");
+ cdEvent.setSubjectUrl("http://dev/task/url");
+ cdEvent.setSubjectPipelineRunId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectPipelineRunSource("http://dev/pipeline/run/subject");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTaskRunStartedEventWithNoSubject() {
+ TaskrunStartedCDEvent cdEvent = new TaskrunStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createTaskRunStartedEventJsonWithOptionalFieldsUnset() throws IOException {
+ InputStream inputStream = getClass().getResourceAsStream("/taskrun_started_optional.json");
+
+ JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
+ JsonNode expectedContextNode = expectedJsonNode.get("context");
+ JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
+
+ TaskrunStartedCDEvent cdEvent = new TaskrunStartedCDEvent();
+ cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
+
+ cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
+ cdEvent.setSubjectPipelineRunId(expectedSubjectNode.get("content").get("pipelineRun").get("id").asText());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+ JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
+ JsonNode cdEventContextNode = cdEventJsonNode.get("context");
+ JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
+
+ //validates CDEvent against schema
+ assertTrue(CDEvents.validateCDEvent(cdEvent));
+
+ //assert context and subject mandatory fields
+ assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
+ assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
+ assertEquals(expectedSubjectNode, cdEventSubjectNode);
+ assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
+ assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
+ assertThat(cdEventSubjectNode.get("content").get("pipelineRun").get("id").asText()).isEqualTo(expectedSubjectNode.get("content").get("pipelineRun").get("id").asText());
+
+ //assert Optional fields Subject Source, Content taskName, URL and pipelineRun Source are set to null
+ assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("taskName")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("url")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("pipelineRun").get("source")).isEqualTo(null);
+
+ }
+
+ @Test
+ void createTaskRunFinishedEventAsCloudEvent() {
+
+ TaskrunFinishedCDEvent cdEvent = new TaskrunFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/task/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/task/run/subject"));
+ cdEvent.setSubjectTaskName("test-task-finished");
+ cdEvent.setSubjectUrl("http://dev/task/url");
+ cdEvent.setSubjectErrors("errors to place");
+ cdEvent.setSubjectOutcome(CDEventConstants.Outcome.SUCCESS.getOutcome());
+ cdEvent.setSubjectPipelineRunId("/dev/pipeline/run/subject");
+ cdEvent.setSubjectPipelineRunSource("http://dev/pipeline/run/subject");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void createTaskRunFinishedEventJsonWithOptionalFieldsUnset() throws IOException {
+
+ InputStream inputStream = getClass().getResourceAsStream("/taskrun_finished_optional.json");
+
+ JsonNode expectedJsonNode = objectMapper.readTree(inputStream);
+ JsonNode expectedContextNode = expectedJsonNode.get("context");
+ JsonNode expectedSubjectNode = expectedJsonNode.get("subject");
+
+ TaskrunFinishedCDEvent cdEvent = new TaskrunFinishedCDEvent();
+ cdEvent.setSource(URI.create(expectedContextNode.get("source").asText()));
+ cdEvent.setSubjectId(expectedSubjectNode.get("id").asText());
+ cdEvent.setSubjectPipelineRunId(expectedSubjectNode.get("content").get("pipelineRun").get("id").asText());
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+ JsonNode cdEventJsonNode = objectMapper.readTree(cdEventJson);
+ JsonNode cdEventContextNode = cdEventJsonNode.get("context");
+ JsonNode cdEventSubjectNode = cdEventJsonNode.get("subject");
+
+ //validates CDEvent against schema
+ assertTrue(CDEvents.validateCDEvent(cdEvent));
+
+ //assert context and subject mandatory fields
+ assertThat(cdEventContextNode.get("type").asText()).isEqualTo(expectedContextNode.get("type").asText());
+ assertThat(cdEventContextNode.get("source").asText()).isEqualTo(expectedContextNode.get("source").asText());
+ assertEquals(expectedSubjectNode, cdEventSubjectNode);
+ assertThat(cdEventSubjectNode.get("id").asText()).isEqualTo(expectedSubjectNode.get("id").asText());
+ assertThat(cdEventSubjectNode.get("type").asText()).isEqualTo(expectedSubjectNode.get("type").asText());
+ assertThat(cdEventSubjectNode.get("content").get("pipelineRun").get("id").asText()).isEqualTo(expectedSubjectNode.get("content").get("pipelineRun").get("id").asText());
+
+ //assert Optional fields Subject Source, Content taskName, URL, outcome, errors and pipelineRun Source are set to null
+ assertThat(cdEventSubjectNode.get("source")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("taskName")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("url")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("outcome")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("errors")).isEqualTo(null);
+ assertThat(cdEventSubjectNode.get("content").get("pipelineRun").get("source")).isEqualTo(null);
+ }
+
+ @Test
+ void testInvalidTaskRunFinishedEventWithNoSubject() {
+ TaskrunFinishedCDEvent cdEvent = new TaskrunFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createRepositoryCreatedEventAsCloudEvent() {
+
+ RepositoryCreatedCDEvent cdEvent = new RepositoryCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/github.com/test-repo");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-repo"));
+ cdEvent.setSubjectName("test-repo");
+ cdEvent.setSubjectOwner("test-user");
+ cdEvent.setSubjectUrl("git://github.com/test-org/test-repo");
+ cdEvent.setSubjectViewUrl("http://github.com/test-org/test-repo/view");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidRepositoryCreatedEventWithNoSubject() {
+ RepositoryCreatedCDEvent cdEvent = new RepositoryCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createRepositoryModifiedEventAsCloudEvent() {
+
+ RepositoryModifiedCDEvent cdEvent = new RepositoryModifiedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/github.com/test-repo");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-repo"));
+ cdEvent.setSubjectName("test-repo");
+ cdEvent.setSubjectOwner("test-user");
+ cdEvent.setSubjectUrl("git://github.com/test-org/test-repo");
+ cdEvent.setSubjectViewUrl("http://github.com/test-org/test-repo/view");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidRepositoryModifiedEventWithNoSubject() {
+ RepositoryModifiedCDEvent cdEvent = new RepositoryModifiedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createRepositoryDeletedEventAsCloudEvent() {
+
+ RepositoryDeletedCDEvent cdEvent = new RepositoryDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/github.com/test-repo");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-repo"));
+ cdEvent.setSubjectName("test-repo");
+ cdEvent.setSubjectOwner("test-user");
+ cdEvent.setSubjectUrl("git://github.com/test-org/test-repo");
+ cdEvent.setSubjectViewUrl("http://github.com/test-org/test-repo/view");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidRepositoryDeletedEventWithNoSubject() {
+ RepositoryDeletedCDEvent cdEvent = new RepositoryDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createBranchCreatedEventAsCloudEvent() {
+
+ BranchCreatedCDEvent cdEvent = new BranchCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidBranchCreatedEventWithNoSubject() {
+ BranchCreatedCDEvent cdEvent = new BranchCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createBranchDeletedEventAsCloudEvent() {
+
+ BranchDeletedCDEvent cdEvent = new BranchDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidBranchDeletedEventWithNoSubject() {
+ BranchDeletedCDEvent cdEvent = new BranchDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createChangeCreatedEventAsCloudEvent() {
+
+ ChangeCreatedCDEvent cdEvent = new ChangeCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidChangeCreatedEventWithNoSubject() {
+ ChangeCreatedCDEvent cdEvent = new ChangeCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createChangeReviewedEventAsCloudEvent() {
+
+ ChangeReviewedCDEvent cdEvent = new ChangeReviewedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidChangeReviewedEventWithNoSubject() {
+ ChangeReviewedCDEvent cdEvent = new ChangeReviewedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createChangeMergedEventAsCloudEvent() {
+
+ ChangeMergedCDEvent cdEvent = new ChangeMergedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidChangeMergedEventWithNoSubject() {
+ ChangeMergedCDEvent cdEvent = new ChangeMergedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createChangeAbandonedEventAsCloudEvent() {
+
+ ChangeAbandonedCDEvent cdEvent = new ChangeAbandonedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidChangeAbandonedEventWithNoSubject() {
+ ChangeAbandonedCDEvent cdEvent = new ChangeAbandonedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+ @Test
+ void createChangeUpdatedEventAsCloudEvent() {
+
+ ChangeUpdatedCDEvent cdEvent = new ChangeUpdatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-branch");
+ cdEvent.setSubjectSource(URI.create("/github.com/test-branch"));
+ cdEvent.setSubjectRepositoryId("/github.com/test-repo");
+ cdEvent.setSubjectRepositorySource("http://github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidChangeUpdatedEventWithNoSubject() {
+ ChangeUpdatedCDEvent cdEvent = new ChangeUpdatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createBuildQueuedEventAsCloudEvent() {
+
+ BuildQueuedCDEvent cdEvent = new BuildQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-build");
+ cdEvent.setSubjectSource(URI.create("/dev/builds/test-build"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidBuildQueuedEventWithNoSubject() {
+ BuildQueuedCDEvent cdEvent = new BuildQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createBuildStartedEventAsCloudEvent() {
+
+ BuildStartedCDEvent cdEvent = new BuildStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-build");
+ cdEvent.setSubjectSource(URI.create("/dev/builds/test-build"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidBuildStartedEventWithNoSubject() {
+ BuildStartedCDEvent cdEvent = new BuildStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createBuildFinishedAsCloudEvent() throws MalformedPackageURLException {
+
+ BuildFinishedCDEvent cdEvent = new BuildFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-build");
+ cdEvent.setSubjectSource(URI.create("/dev/builds/test-build"));
+ cdEvent.setSubjectArtifactId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidBuildFinishedEventWithNoSubject() {
+ BuildFinishedCDEvent cdEvent = new BuildFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createTestCaseQueuedEventAsCloudEvent() {
+
+ TestcaseQueuedCDEvent cdEvent = new TestcaseQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-case-1");
+ cdEvent.setSubjectSource(URI.create("/dev/test-case"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTestCaseQueuedEventWithNoSubject() {
+ TestcaseQueuedCDEvent cdEvent = new TestcaseQueuedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+ @Test
+ void createTestCaseStartedEventAsCloudEvent() {
+
+ TestcaseStartedCDEvent cdEvent = new TestcaseStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-case-1");
+ cdEvent.setSubjectSource(URI.create("/dev/test-case"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTestCaseStartedEventWithNoSubject() {
+ TestcaseStartedCDEvent cdEvent = new TestcaseStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createTestCaseFinishedEventAsCloudEvent() {
+
+ TestcaseFinishedCDEvent cdEvent = new TestcaseFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-case-1");
+ cdEvent.setSubjectSource(URI.create("/dev/test-case"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTestCaseFinishedEventWithNoSubject() {
+ TestcaseFinishedCDEvent cdEvent = new TestcaseFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createTestSuiteStartedEventAsCloudEvent() {
+
+ TestsuiteStartedCDEvent cdEvent = new TestsuiteStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-suite-1");
+ cdEvent.setSubjectSource(URI.create("/dev/test-suite"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTestSuiteStartedEventWithNoSubject() {
+ TestsuiteStartedCDEvent cdEvent = new TestsuiteStartedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createTestSuiteFinishedEventAsCloudEvent() {
+
+ TestsuiteFinishedCDEvent cdEvent = new TestsuiteFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("test-suite-1");
+ cdEvent.setSubjectSource(URI.create("/dev/test-suite"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidTestSuiteFinishedEventWithNoSubject() {
+ TestsuiteFinishedCDEvent cdEvent = new TestsuiteFinishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createArtifactPackagedEventAsCloudEvent() throws MalformedPackageURLException {
+
+ ArtifactPackagedCDEvent cdEvent = new ArtifactPackagedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b");
+ cdEvent.setSubjectSource(URI.create("/dev/artifact/source"));
+
+ cdEvent.setSubjectChangeId("test-feature");
+ cdEvent.setSubjectChangeSource("/github.com/test-repo");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidArtifactPackagedEventWithNoSubject() {
+ ArtifactPackagedCDEvent cdEvent = new ArtifactPackagedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createArtifactPublishedEventAsCloudEvent() throws MalformedPackageURLException {
+ ArtifactPublishedCDEvent cdEvent = new ArtifactPublishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b");
+ cdEvent.setSubjectSource(URI.create("/dev/artifact/source"));
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+
+ }
+
+ @Test
+ void testInvalidArtifactPublishedEventWithNoSubject() {
+ ArtifactPublishedCDEvent cdEvent = new ArtifactPublishedCDEvent();
+
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createEnvironmentCreatedEventAsCloudEvent() {
+ EnvironmentCreatedCDEvent cdEvent = new EnvironmentCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/environment/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/environment/run/subject"));
+ cdEvent.setSubjectName("Name");
+ cdEvent.setSubjectUrl("http://dev/environment/url");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidEnvironmentCreatedEventWithNoSubject() {
+ EnvironmentCreatedCDEvent cdEvent = new EnvironmentCreatedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createEnvironmentModifiedEventAsCloudEvent() {
+ EnvironmentModifiedCDEvent cdEvent = new EnvironmentModifiedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/environment/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/environment/run/subject"));
+ cdEvent.setSubjectName("Name");
+ cdEvent.setSubjectUrl("http://dev/environment/url");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidEnvironmentModifiedEventWithNoSubject() {
+ EnvironmentModifiedCDEvent cdEvent = new EnvironmentModifiedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createEnvironmentDeletedEventAsCloudEvent() {
+ EnvironmentDeletedCDEvent cdEvent = new EnvironmentDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/environment/run/subject");
+ cdEvent.setSubjectSource(URI.create("/dev/environment/run/subject"));
+ cdEvent.setSubjectName("Name");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidEnvironmentDeletedEventWithNoSubject() {
+ EnvironmentDeletedCDEvent cdEvent = new EnvironmentDeletedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createServiceDeployedEventAsCloudEvent() throws MalformedPackageURLException {
+ ServiceDeployedCDEvent cdEvent = new ServiceDeployedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/service/run/subject");
+ cdEvent.setSubjectSource(URI.create("dev/service/run/subject"));
+ cdEvent.setSubjectEnvironmentId("dev/environment/run/subject");
+ cdEvent.setSubjectEnvironmentSource("dev/environment/run/subject");
+ cdEvent.setSubjectArtifactId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidServiceDeployedEventWithNoSubject() {
+ ServiceDeployedCDEvent cdEvent = new ServiceDeployedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createServiceUpgradedEventAsCloudEvent() throws MalformedPackageURLException {
+ ServiceUpgradedCDEvent cdEvent = new ServiceUpgradedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/service/run/subject");
+ cdEvent.setSubjectSource(URI.create("dev/service/run/subject"));
+ cdEvent.setSubjectEnvironmentId("dev/environment/run/subject");
+ cdEvent.setSubjectEnvironmentSource("dev/environment/run/subject");
+ cdEvent.setSubjectArtifactId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidServiceUpgradedEventWithNoSubject() {
+ ServiceUpgradedCDEvent cdEvent = new ServiceUpgradedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createServiceRolledBackEventAsCloudEvent() throws MalformedPackageURLException {
+ ServiceRolledbackCDEvent cdEvent = new ServiceRolledbackCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/service/run/subject");
+ cdEvent.setSubjectSource(URI.create("dev/service/run/subject"));
+ cdEvent.setSubjectEnvironmentId("dev/environment/run/subject");
+ cdEvent.setSubjectEnvironmentSource("dev/environment/run/subject");
+ cdEvent.setSubjectArtifactId("pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidServiceRolledBackEventWithNoSubject() {
+ ServiceRolledbackCDEvent cdEvent = new ServiceRolledbackCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createServiceRemovedEventAsCloudEvent() {
+ ServiceRemovedCDEvent cdEvent = new ServiceRemovedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/service/run/subject");
+ cdEvent.setSubjectSource(URI.create("dev/service/run/subject"));
+ cdEvent.setSubjectEnvironmentId("dev/environment/run/subject");
+ cdEvent.setSubjectEnvironmentSource("dev/environment/run/subject");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidServiceRemovedEventWithNoSubject() {
+ ServiceRemovedCDEvent cdEvent = new ServiceRemovedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+
+ @Test
+ void createServicePublishedEventAsCloudEvent() {
+ ServicePublishedCDEvent cdEvent = new ServicePublishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ cdEvent.setSubjectId("/dev/service/run/subject");
+ cdEvent.setSubjectSource(URI.create("dev/service/run/subject"));
+ cdEvent.setSubjectEnvironmentId("dev/environment/run/subject");
+ cdEvent.setSubjectEnvironmentSource("dev/environment/run/subject");
+
+ String cdEventJson = CDEvents.cdEventAsJson(cdEvent);
+
+ CloudEvent ceEvent = CDEvents.cdEventAsCloudEvent(cdEvent);
+
+ String ceDataJson = new String(ceEvent.getData().toBytes(), StandardCharsets.UTF_8);
+
+ assertThat(ceEvent.getType()).isEqualTo(cdEvent.getContext().getType().value());
+ assertThat(ceEvent.getSource().toString()).isEqualTo(cdEvent.getContext().getSource());
+ assertThat(ceDataJson).isEqualTo(cdEventJson);
+ }
+
+ @Test
+ void testInvalidServicePublishedEventWithNoSubject() {
+ ServicePublishedCDEvent cdEvent = new ServicePublishedCDEvent();
+ cdEvent.setSource(URI.create("http://dev.cdevents"));
+
+ Exception exception = assertThrows(CDEventsException.class, () -> {
+ CDEvents.cdEventAsCloudEvent(cdEvent);
+ });
+ String expectedError = "CDEvent validation failed against schema URL - " + cdEvent.schemaURL();
+
+ assertThat(exception.getMessage()).isEqualTo(expectedError);
+ }
+}
diff --git a/sdk/src/test/resources/pipelinerun_queued_optional.json b/sdk/src/test/resources/pipelinerun_queued_optional.json
index 8a659bc..ecade5c 100644
--- a/sdk/src/test/resources/pipelinerun_queued_optional.json
+++ b/sdk/src/test/resources/pipelinerun_queued_optional.json
@@ -11,7 +11,7 @@
"customDataContentType": "application/json",
"subject": {
"id": "/dev/pipeline/run/subject",
- "type": "PIPELINERUN",
+ "type": "pipelineRun",
"content": {
}
}
diff --git a/sdk/src/test/resources/pipelinerun_started_optional.json b/sdk/src/test/resources/pipelinerun_started_optional.json
index a54cd77..28c5ba4 100644
--- a/sdk/src/test/resources/pipelinerun_started_optional.json
+++ b/sdk/src/test/resources/pipelinerun_started_optional.json
@@ -11,7 +11,7 @@
"customDataContentType": "application/json",
"subject": {
"id": "/dev/pipeline/run/subject",
- "type": "PIPELINERUN",
+ "type": "pipelineRun",
"content": {
"pipelineName": "test-pipeline-started",
"url": "http://dev/pipeline/url"
diff --git a/sdk/src/test/resources/taskrun_finished_optional.json b/sdk/src/test/resources/taskrun_finished_optional.json
index dffd9f1..c750eff 100644
--- a/sdk/src/test/resources/taskrun_finished_optional.json
+++ b/sdk/src/test/resources/taskrun_finished_optional.json
@@ -11,7 +11,7 @@
"customDataContentType": "application/json",
"subject": {
"id": "/dev/task/run/subject",
- "type": "TASKRUN",
+ "type": "taskRun",
"content": {
"pipelineRun": {
"id": "/dev/pipeline/run/subject"
diff --git a/sdk/src/test/resources/taskrun_started_optional.json b/sdk/src/test/resources/taskrun_started_optional.json
index d5f568d..812be3b 100644
--- a/sdk/src/test/resources/taskrun_started_optional.json
+++ b/sdk/src/test/resources/taskrun_started_optional.json
@@ -11,7 +11,7 @@
"customDataContentType": "application/json",
"subject": {
"id": "/dev/task/run/subject",
- "type": "TASKRUN",
+ "type": "taskRun",
"content": {
"pipelineRun": {
"id": "/dev/pipeline/run/subject"
diff --git a/spec b/spec
new file mode 160000
index 0000000..ffe67bb
--- /dev/null
+++ b/spec
@@ -0,0 +1 @@
+Subproject commit ffe67bb05f2abcf294b2b4d831dab3cb8f0eadd4