blob: 3fec2fd64e056669eaa494080ae121a7145e4211 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.jira;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* @author mortent
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class JiraCreateIssue {
@JsonProperty("fields")
public final JiraFields fields;
public JiraCreateIssue(JiraFields fields) {
this.fields = fields;
}
public static class JiraFields {
@JsonProperty("summary")
public final String summary;
@JsonProperty("description")
public final String description;
@JsonProperty("project")
public final JiraProject project;
@JsonProperty("issuetype")
public final JiraIssueType issueType;
@JsonProperty("components")
public final List<JiraComponent> components;
public JiraFields(
JiraProject project,
String summary,
String description,
JiraIssueType issueType,
List<JiraComponent> components) {
this.project = project;
this.summary = summary;
this.description = description;
this.issueType = issueType;
this.components = components;
}
public static class JiraProject {
public static final JiraProject VESPA = new JiraProject("VESPA");
@JsonProperty("key")
public final String key;
public JiraProject(String key) {
this.key = key;
}
}
public static class JiraIssueType {
public static final JiraIssueType DEFECT = new JiraIssueType("Defect");
@JsonProperty("name")
public final String name;
public JiraIssueType(String name) {
this.name = name;
}
}
public static class JiraComponent {
public static final JiraComponent COREDUMPS = new JiraComponent("CoreDumps");
@JsonProperty("name")
public final String name;
public JiraComponent(String name) {
this.name = name;
}
}
}
}
|