1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
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  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.codegen.model.config.customization;
17 
18 import java.util.Map;
19 
20 /**
21  * Indicating a field that can be an ARN
22  */
23 public class S3ArnableFieldConfig {
24     private String field;
25 
26     private String arnConverterFqcn;
27 
28     private String arnResourceFqcn;
29 
30     /**
31      * The ARN field to be substituted set the value from the getter
32      */
33     private String arnResourceSubstitutionGetter;
34 
35     private String baseArnResourceFqcn;
36 
37     private String executionAttributeKeyFqcn;
38 
39     private String executionAttributeValueFqcn;
40 
41     /**
42      * Contains the fields that need to be populated if null from the getter methods.
43      *
44      * The key is the field name and the value is the getter method in ARN which supplies the value
45      */
46     private Map<String, String> otherFieldsToPopulate;
47 
getField()48     public String getField() {
49         return field;
50     }
51 
52     /**
53      * Sets the field
54      *
55      * @param field The new field value.
56      * @return This object for method chaining.
57      */
setField(String field)58     public S3ArnableFieldConfig setField(String field) {
59         this.field = field;
60         return this;
61     }
62 
63     /**
64      * @return the FQCN of the ArnConverter
65      */
getArnConverterFqcn()66     public String getArnConverterFqcn() {
67         return arnConverterFqcn;
68     }
69 
70     /**
71      * Sets the arnConverterFqcn
72      *
73      * @param arnConverterFqcn The new arnConverterFqcn value.
74      * @return This object for method chaining.
75      */
setArnConverterFqcn(String arnConverterFqcn)76     public S3ArnableFieldConfig setArnConverterFqcn(String arnConverterFqcn) {
77         this.arnConverterFqcn = arnConverterFqcn;
78         return this;
79     }
80 
getArnResourceFqcn()81     public String getArnResourceFqcn() {
82         return arnResourceFqcn;
83     }
84 
85     /**
86      * Sets the arnResourceFqcn
87      *
88      * @param arnResourceFqcn The new arnResourceFqcn value.
89      * @return This object for method chaining.
90      */
setArnResourceFqcn(String arnResourceFqcn)91     public S3ArnableFieldConfig setArnResourceFqcn(String arnResourceFqcn) {
92         this.arnResourceFqcn = arnResourceFqcn;
93         return this;
94     }
95 
getArnResourceSubstitutionGetter()96     public String getArnResourceSubstitutionGetter() {
97         return arnResourceSubstitutionGetter;
98     }
99 
100     /**
101      * Sets the arnResourceSubstitutionGetter
102      *
103      * @param arnResourceSubstitutionGetter The new arnResourceSubstitutionGetter value.
104      * @return This object for method chaining.
105      */
setArnResourceSubstitutionGetter(String arnResourceSubstitutionGetter)106     public S3ArnableFieldConfig setArnResourceSubstitutionGetter(String arnResourceSubstitutionGetter) {
107         this.arnResourceSubstitutionGetter = arnResourceSubstitutionGetter;
108         return this;
109     }
110 
getOtherFieldsToPopulate()111     public Map<String, String> getOtherFieldsToPopulate() {
112         return otherFieldsToPopulate;
113     }
114 
115     /**
116      * Sets the substitionSetterToGetter
117      *
118      * @param substitionSetterToGetter The new substitionSetterToGetter value.
119      * @return This object for method chaining.
120      */
setSubstitionSetterToGetter(Map<String, String> substitionSetterToGetter)121     public S3ArnableFieldConfig setSubstitionSetterToGetter(Map<String, String> substitionSetterToGetter) {
122         this.otherFieldsToPopulate = substitionSetterToGetter;
123         return this;
124     }
125 
getBaseArnResourceFqcn()126     public String getBaseArnResourceFqcn() {
127         return baseArnResourceFqcn;
128     }
129 
130     /**
131      * Sets the baseArnResourceFqcn
132      *
133      * @param baseArnResourceFqcn The new baseArnResourceFqcn value.
134      * @return This object for method chaining.
135      */
setBaseArnResourceFqcn(String baseArnResourceFqcn)136     public S3ArnableFieldConfig setBaseArnResourceFqcn(String baseArnResourceFqcn) {
137         this.baseArnResourceFqcn = baseArnResourceFqcn;
138         return this;
139     }
140 
getExecutionAttributeKeyFqcn()141     public String getExecutionAttributeKeyFqcn() {
142         return executionAttributeKeyFqcn;
143     }
144 
145     /**
146      * Sets the executionAttributeKeyFqcn
147      *
148      * @param executionAttributeKeyFqcn The new executionAttributeKeyFqcn value.
149      * @return This object for method chaining.
150      */
setExecutionAttributeKeyFqcn(String executionAttributeKeyFqcn)151     public S3ArnableFieldConfig setExecutionAttributeKeyFqcn(String executionAttributeKeyFqcn) {
152         this.executionAttributeKeyFqcn = executionAttributeKeyFqcn;
153         return this;
154     }
155 
getExecutionAttributeValueFqcn()156     public String getExecutionAttributeValueFqcn() {
157         return executionAttributeValueFqcn;
158     }
159 
160     /**
161      * Sets the executionAttributeValueFqcn
162      *
163      * @param executionAttributeValueFqcn The new executionAttributeValueFqcn value.
164      * @return This object for method chaining.
165      */
setExecutionAttributeValueFqcn(String executionAttributeValueFqcn)166     public S3ArnableFieldConfig setExecutionAttributeValueFqcn(String executionAttributeValueFqcn) {
167         this.executionAttributeValueFqcn = executionAttributeValueFqcn;
168         return this;
169     }
170 
171     /**
172      * Sets the otherFieldsToPopulate
173      *
174      * @param otherFieldsToPopulate The new otherFieldsToPopulate value.
175      * @return This object for method chaining.
176      */
setOtherFieldsToPopulate(Map<String, String> otherFieldsToPopulate)177     public S3ArnableFieldConfig setOtherFieldsToPopulate(Map<String, String> otherFieldsToPopulate) {
178         this.otherFieldsToPopulate = otherFieldsToPopulate;
179         return this;
180     }
181 }
182