1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package br.com.ingenieux.mojo.beanstalk.cmd.env.update;
23
24 import com.amazonaws.services.elasticbeanstalk.model.ConfigurationOptionSetting;
25 import com.amazonaws.services.elasticbeanstalk.model.OptionSpecification;
26
27 public class UpdateEnvironmentContextBuilder extends UpdateEnvironmentContextBuilderBase<UpdateEnvironmentContextBuilder> {
28
29 public UpdateEnvironmentContextBuilder() {
30 super(new UpdateEnvironmentContext());
31 }
32
33 public static UpdateEnvironmentContextBuilder updateEnvironmentContext() {
34 return new UpdateEnvironmentContextBuilder();
35 }
36
37 public UpdateEnvironmentContext build() {
38 return getInstance();
39 }
40 }
41
42 class UpdateEnvironmentContextBuilderBase<GeneratorT extends UpdateEnvironmentContextBuilderBase<GeneratorT>> {
43
44 private UpdateEnvironmentContext instance;
45
46 protected UpdateEnvironmentContextBuilderBase(UpdateEnvironmentContext aInstance) {
47 instance = aInstance;
48 }
49
50 protected UpdateEnvironmentContext getInstance() {
51 return instance;
52 }
53
54 @SuppressWarnings("unchecked")
55 public GeneratorT withEnvironmentName(String aValue) {
56 instance.setEnvironmentName(aValue);
57
58 return (GeneratorT) this;
59 }
60
61 @SuppressWarnings("unchecked")
62 public GeneratorT withEnvironmentId(String aValue) {
63 instance.setEnvironmentId(aValue);
64
65 return (GeneratorT) this;
66 }
67
68 @SuppressWarnings("unchecked")
69 public GeneratorT withVersionLabel(String aValue) {
70 instance.setVersionLabel(aValue);
71
72 return (GeneratorT) this;
73 }
74
75 @SuppressWarnings("unchecked")
76 public GeneratorT withEnvironmentDescription(String aValue) {
77 instance.setEnvironmentDescription(aValue);
78
79 return (GeneratorT) this;
80 }
81
82 @SuppressWarnings("unchecked")
83 public GeneratorT withOptionSettings(ConfigurationOptionSetting[] aValue) {
84 instance.setOptionSettings(aValue);
85
86 return (GeneratorT) this;
87 }
88
89 @SuppressWarnings("unchecked")
90 public GeneratorT withOptionsToRemove(OptionSpecification[] aValue) {
91 instance.setOptionsToRemove(aValue);
92
93 return (GeneratorT) this;
94 }
95
96 @SuppressWarnings("unchecked")
97 public GeneratorT withTemplateName(String aValue) {
98 instance.setTemplateName(aValue);
99
100 return (GeneratorT) this;
101 }
102
103 @SuppressWarnings("unchecked")
104 public GeneratorT withLatestVersionLabel(String aValue) {
105 instance.setLatestVersionLabel(aValue);
106
107 return (GeneratorT) this;
108 }
109
110 @SuppressWarnings("unchecked")
111 public GeneratorT withEnvironmentTierName(String aValue) {
112 instance.setEnvironmentTierName(aValue);
113
114 return (GeneratorT) this;
115 }
116
117 @SuppressWarnings("unchecked")
118 public GeneratorT withEnvironmentTierType(String aValue) {
119 instance.setEnvironmentTierType(aValue);
120
121 return (GeneratorT) this;
122 }
123
124 @SuppressWarnings("unchecked")
125 public GeneratorT withEnvironmentTierVersion(String aValue) {
126 instance.setEnvironmentTierVersion(aValue);
127
128 return (GeneratorT) this;
129 }
130 }