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  // CHECKSTYLE:OFF
18  /**
19   * Source code generated by Fluent Builders Generator Do not modify this file See generator home
20   * page at: http://code.google.com/p/fluent-builders-generator-eclipse-plugin/
21   */
22  package br.com.ingenieux.mojo.beanstalk.cmd.env.terminate;
23  
24  public class TerminateEnvironmentContextBuilder extends TerminateEnvironmentContextBuilderBase<TerminateEnvironmentContextBuilder> {
25  
26    public TerminateEnvironmentContextBuilder() {
27      super(new TerminateEnvironmentContext());
28    }
29  
30    public static TerminateEnvironmentContextBuilder terminateEnvironmentContext() {
31      return new TerminateEnvironmentContextBuilder();
32    }
33  
34    public TerminateEnvironmentContext build() {
35      return getInstance();
36    }
37  }
38  
39  class TerminateEnvironmentContextBuilderBase<GeneratorT extends TerminateEnvironmentContextBuilderBase<GeneratorT>> {
40  
41    private TerminateEnvironmentContext instance;
42  
43    protected TerminateEnvironmentContextBuilderBase(TerminateEnvironmentContext aInstance) {
44      instance = aInstance;
45    }
46  
47    protected TerminateEnvironmentContext getInstance() {
48      return instance;
49    }
50  
51    @SuppressWarnings("unchecked")
52    public GeneratorT withEnvironmentId(String aValue) {
53      instance.setEnvironmentId(aValue);
54  
55      return (GeneratorT) this;
56    }
57  
58    @SuppressWarnings("unchecked")
59    public GeneratorT withEnvironmentName(String aValue) {
60      instance.setEnvironmentName(aValue);
61  
62      return (GeneratorT) this;
63    }
64  
65    @SuppressWarnings("unchecked")
66    public GeneratorT withTerminateResources(boolean aValue) {
67      instance.setTerminateResources(aValue);
68  
69      return (GeneratorT) this;
70    }
71  }