1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.jira.rest.client.api;
18
19 import com.google.common.collect.ImmutableList;
20 import com.google.common.collect.Sets;
21
22
23
24
25
26
27
28
29
30
31
32
33
34 public class GetCreateIssueMetadataOptionsBuilder {
35 private Iterable<String> expandos = Sets.newHashSet();
36 private Iterable<String> issueTypeNames;
37 private Iterable<Long> issueTypeIds;
38 private Iterable<String> projectKeys;
39 private Iterable<Long> projectIds;
40
41 public GetCreateIssueMetadataOptionsBuilder withExpandos(Iterable<String> expandos) {
42 this.expandos = expandos;
43 return this;
44 }
45
46 @SuppressWarnings("UnusedDeclaration")
47 public GetCreateIssueMetadataOptionsBuilder withExpandos(String... expandos) {
48 return withExpandos(ImmutableList.copyOf(expandos));
49 }
50
51 public GetCreateIssueMetadataOptionsBuilder withExpandedIssueTypesFields() {
52 return withExpandos(ImmutableList.of(GetCreateIssueMetadataOptions.EXPAND_PROJECTS_ISSUETYPES_FIELDS));
53 }
54
55 public GetCreateIssueMetadataOptionsBuilder withIssueTypeNames(Iterable<String> issueTypeNames) {
56 this.issueTypeNames = issueTypeNames;
57 return this;
58 }
59
60 @SuppressWarnings("UnusedDeclaration")
61
62 public GetCreateIssueMetadataOptionsBuilder withIssueTypeNames(String... issueTypeNames) {
63 return withIssueTypeNames(ImmutableList.copyOf(issueTypeNames));
64 }
65
66 public GetCreateIssueMetadataOptionsBuilder withIssueTypeIds(Iterable<Long> issueTypeIds) {
67 this.issueTypeIds = issueTypeIds;
68 return this;
69 }
70
71 @SuppressWarnings("UnusedDeclaration")
72 public GetCreateIssueMetadataOptionsBuilder withIssueTypeIds(Long... issueTypeIds) {
73 return withIssueTypeIds(ImmutableList.copyOf(issueTypeIds));
74 }
75
76 public GetCreateIssueMetadataOptionsBuilder withProjectKeys(Iterable<String> projectKeys) {
77 this.projectKeys = projectKeys;
78 return this;
79 }
80
81 public GetCreateIssueMetadataOptionsBuilder withProjectKeys(String... projectKeys) {
82 return withProjectKeys(ImmutableList.copyOf(projectKeys));
83 }
84
85 public GetCreateIssueMetadataOptionsBuilder withProjectIds(Iterable<Long> projectIds) {
86 this.projectIds = projectIds;
87 return this;
88 }
89
90 @SuppressWarnings("UnusedDeclaration")
91 public GetCreateIssueMetadataOptionsBuilder withProjectIds(Long... projectIds) {
92 return withProjectIds(ImmutableList.copyOf(projectIds));
93 }
94
95 public GetCreateIssueMetadataOptions build() {
96 return new GetCreateIssueMetadataOptions(expandos, issueTypeNames, issueTypeIds, projectKeys, projectIds);
97 }
98 }