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.swap;
23  
24  public class SwapCNamesContextBuilder extends SwapCNamesContextBuilderBase<SwapCNamesContextBuilder> {
25  
26    public SwapCNamesContextBuilder() {
27      super(new SwapCNamesContext());
28    }
29  
30    public static SwapCNamesContextBuilder swapCNamesContext() {
31      return new SwapCNamesContextBuilder();
32    }
33  
34    public SwapCNamesContext build() {
35      return getInstance();
36    }
37  }
38  
39  class SwapCNamesContextBuilderBase<GeneratorT extends SwapCNamesContextBuilderBase<GeneratorT>> {
40  
41    private SwapCNamesContext instance;
42  
43    protected SwapCNamesContextBuilderBase(SwapCNamesContext aInstance) {
44      instance = aInstance;
45    }
46  
47    protected SwapCNamesContext getInstance() {
48      return instance;
49    }
50  
51    @SuppressWarnings("unchecked")
52    public GeneratorT withSourceEnvironmentName(String aValue) {
53      instance.setSourceEnvironmentName(aValue);
54  
55      return (GeneratorT) this;
56    }
57  
58    @SuppressWarnings("unchecked")
59    public GeneratorT withSourceEnvironmentId(String aValue) {
60      instance.setSourceEnvironmentId(aValue);
61  
62      return (GeneratorT) this;
63    }
64  
65    @SuppressWarnings("unchecked")
66    public GeneratorT withDestinationEnvironmentName(String aValue) {
67      instance.setDestinationEnvironmentName(aValue);
68  
69      return (GeneratorT) this;
70    }
71  
72    @SuppressWarnings("unchecked")
73    public GeneratorT withDestinationEnvironmentId(String aValue) {
74      instance.setDestinationEnvironmentId(aValue);
75  
76      return (GeneratorT) this;
77    }
78  }