@@ -66,6 +66,13 @@ public class ProviderInputModel {
6666 @ JsonProperty ("event_delivery_format" )
6767 private final String eventDeliveryFormat ;
6868
69+ /**
70+ * Optional data residency region (following Adobe Hosting location naming standards).
71+ * If omitted, the default region defined on the provider metadata is used.
72+ */
73+ @ JsonProperty ("data_residency_region" )
74+ private final String dataResidencyRegion ;
75+
6976 /**
7077 * The label of this Events Provider, as shown on the Adobe I/O console
7178 */
@@ -78,7 +85,7 @@ public class ProviderInputModel {
7885 private final String docsUrl ;
7986
8087 private ProviderInputModel (final String label , final String description , final String docsUrl , final String instanceId ,
81- final String providerMetadataId , final String eventDeliveryFormat ) {
88+ final String providerMetadataId , final String eventDeliveryFormat , final String dataResidencyRegion ) {
8289 if (StringUtils .isEmpty (label )) {
8390 throw new IllegalArgumentException (
8491 "ProviderUpdateModel is missing a label" );
@@ -90,6 +97,7 @@ private ProviderInputModel(final String label, final String description, final S
9097 this .docsUrl = docsUrl ;
9198 this .instanceId = instanceId ;
9299 this .eventDeliveryFormat = eventDeliveryFormat ;
100+ this .dataResidencyRegion = dataResidencyRegion ;
93101 }
94102
95103 public String getLabel () {
@@ -110,6 +118,8 @@ public String getDocsUrl() {
110118
111119 public String getEventDeliveryFormat () { return this .eventDeliveryFormat ; }
112120
121+ public String getDataResidencyRegion () { return this .dataResidencyRegion ; }
122+
113123 @ Override
114124 public boolean equals (Object o ) {
115125 if (this == o ) {
@@ -122,12 +132,13 @@ public boolean equals(Object o) {
122132 return Objects .equals (instanceId , that .instanceId ) && Objects .equals (providerMetadataId ,
123133 that .providerMetadataId ) && Objects .equals (eventDeliveryFormat ,
124134 that .eventDeliveryFormat ) && Objects .equals (label , that .label ) && Objects .equals (
125- description , that .description ) && Objects .equals (docsUrl , that .docsUrl );
135+ description , that .description ) && Objects .equals (docsUrl , that .docsUrl )
136+ && Objects .equals (dataResidencyRegion , that .dataResidencyRegion );
126137 }
127138
128139 @ Override
129140 public int hashCode () {
130- return Objects .hash (instanceId , providerMetadataId , label , description , docsUrl , eventDeliveryFormat );
141+ return Objects .hash (instanceId , providerMetadataId , label , description , docsUrl , eventDeliveryFormat , dataResidencyRegion );
131142 }
132143
133144 @ Override
@@ -139,6 +150,7 @@ public String toString() {
139150 ", providerMetadataId='" + providerMetadataId + '\'' +
140151 ", instanceId='" + instanceId + '\'' +
141152 ", eventDeliveryFormat='" + eventDeliveryFormat + '\'' +
153+ ", dataResidencyRegion='" + dataResidencyRegion + '\'' +
142154 '}' ;
143155 }
144156
@@ -155,6 +167,7 @@ public static class Builder {
155167 private String instanceId ;
156168 private String providerMetadataId ;
157169 private String eventDeliveryFormat ;
170+ private String dataResidencyRegion ;
158171
159172 public Builder () {
160173 }
@@ -189,8 +202,13 @@ public Builder eventDeliveryFormat(final String eventDeliveryFormat) {
189202 return this ;
190203 }
191204
205+ public Builder dataResidencyRegion (final String dataResidencyRegion ) {
206+ this .dataResidencyRegion = dataResidencyRegion ;
207+ return this ;
208+ }
209+
192210 public ProviderInputModel build () {
193- return new ProviderInputModel (label , description , docsUrl , instanceId , providerMetadataId , eventDeliveryFormat );
211+ return new ProviderInputModel (label , description , docsUrl , instanceId , providerMetadataId , eventDeliveryFormat , dataResidencyRegion );
194212 }
195213 }
196214}
0 commit comments