View Javadoc
1   /*
2    * Copyright (c) 2016 ingenieux Labs
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  /**
18   * // CHECKSTYLE:OFF Source code generated by Fluent Builders Generator Do not modify this file See
19   * generator home page at: http://code.google.com/p/fluent-builders-generator-eclipse-plugin/
20   */
21  package br.com.ingenieux.mojo.beanstalk.cmd.env.waitfor;
22  
23  public class WaitForEnvironmentContextBuilder extends WaitForEnvironmentContextBuilderBase<WaitForEnvironmentContextBuilder> {
24  
25    public WaitForEnvironmentContextBuilder() {
26      super(new WaitForEnvironmentContext());
27    }
28  
29    public static WaitForEnvironmentContextBuilder waitForEnvironmentContext() {
30      return new WaitForEnvironmentContextBuilder();
31    }
32  
33    public WaitForEnvironmentContext build() {
34      return getInstance();
35    }
36  }
37  
38  class WaitForEnvironmentContextBuilderBase<GeneratorT extends WaitForEnvironmentContextBuilderBase<GeneratorT>> {
39  
40    private WaitForEnvironmentContext instance;
41  
42    protected WaitForEnvironmentContextBuilderBase(WaitForEnvironmentContext aInstance) {
43      instance = aInstance;
44    }
45  
46    protected WaitForEnvironmentContext getInstance() {
47      return instance;
48    }
49  
50    @SuppressWarnings("unchecked")
51    public GeneratorT withApplicationName(String aValue) {
52      instance.setApplicationName(aValue);
53  
54      return (GeneratorT) this;
55    }
56  
57    @SuppressWarnings("unchecked")
58    public GeneratorT withTimeoutMins(Integer aValue) {
59      instance.setTimeoutMins(aValue);
60  
61      return (GeneratorT) this;
62    }
63  
64    @SuppressWarnings("unchecked")
65    public GeneratorT withHealth(String health) {
66      instance.setHealth(health);
67  
68      return (GeneratorT) this;
69    }
70  
71    @SuppressWarnings("unchecked")
72    public GeneratorT withStatusToWaitFor(String aValue) {
73      instance.setStatusToWaitFor(aValue);
74  
75      return (GeneratorT) this;
76    }
77  
78    @SuppressWarnings("unchecked")
79    public GeneratorT withEnvironmentRef(String aValue) {
80      instance.setEnvironmentRef(aValue);
81  
82      return (GeneratorT) this;
83    }
84  }