Initial code import
[msb/apigateway.git] / apiroute / apiroute-service / src / main / java / org / openo / msb / wrapper / consul / model / catalog / ImmutableCatalogService.java
1 /**\r
2 * Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)\r
3 *\r
4 * Licensed under the Apache License, Version 2.0 (the "License");\r
5 * you may not use this file except in compliance with the License.\r
6 * You may obtain a copy of the License at\r
7 *\r
8 * http://www.apache.org/licenses/LICENSE-2.0\r
9 *\r
10 * Unless required by applicable law or agreed to in writing, software\r
11 * distributed under the License is distributed on an "AS IS" BASIS,\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 * See the License for the specific language governing permissions and\r
14 * limitations under the License.\r
15 */\r
16 \r
17 package org.openo.msb.wrapper.consul.model.catalog;\r
18 \r
19 import com.fasterxml.jackson.annotation.JsonCreator;\r
20 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;\r
21 import com.fasterxml.jackson.annotation.JsonProperty;\r
22 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
23 import com.google.common.base.MoreObjects;\r
24 import com.google.common.base.Preconditions;\r
25 import com.google.common.collect.ImmutableList;\r
26 import com.google.common.collect.Lists;\r
27 import java.util.List;\r
28 import javax.annotation.Generated;\r
29 \r
30 /**\r
31  * Immutable implementation of {@link CatalogService}.\r
32  * <p>\r
33  * Use the builder to create immutable instances:\r
34  * {@code ImmutableCatalogService.builder()}.\r
35  */\r
36 @SuppressWarnings("all")\r
37 @Generated({"Immutables.generator", "CatalogService"})\r
38 @JsonIgnoreProperties(ignoreUnknown = true)\r
39 public final class ImmutableCatalogService extends CatalogService {\r
40   private final String node;\r
41   private final String address;\r
42   private final String serviceName;\r
43   private final String serviceId;\r
44   private final String serviceAddress;\r
45   private final int servicePort;\r
46   private final ImmutableList<String> serviceTags;\r
47 \r
48   private ImmutableCatalogService(\r
49       String node,\r
50       String address,\r
51       String serviceName,\r
52       String serviceId,\r
53       String serviceAddress,\r
54       int servicePort,\r
55       ImmutableList<String> serviceTags) {\r
56     this.node = node;\r
57     this.address = address;\r
58     this.serviceName = serviceName;\r
59     this.serviceId = serviceId;\r
60     this.serviceAddress = serviceAddress;\r
61     this.servicePort = servicePort;\r
62     this.serviceTags = serviceTags;\r
63   }\r
64 \r
65   /**\r
66    * @return The value of the {@code node} attribute\r
67    */\r
68   @JsonProperty(value = "Node")\r
69   @Override\r
70   public String getNode() {\r
71     return node;\r
72   }\r
73 \r
74   /**\r
75    * @return The value of the {@code address} attribute\r
76    */\r
77   @JsonProperty(value = "Address")\r
78   @Override\r
79   public String getAddress() {\r
80     return address;\r
81   }\r
82 \r
83   /**\r
84    * @return The value of the {@code serviceName} attribute\r
85    */\r
86   @JsonProperty(value = "ServiceName")\r
87   @Override\r
88   public String getServiceName() {\r
89     return serviceName;\r
90   }\r
91 \r
92   /**\r
93    * @return The value of the {@code serviceId} attribute\r
94    */\r
95   @JsonProperty(value = "ServiceID")\r
96   @Override\r
97   public String getServiceId() {\r
98     return serviceId;\r
99   }\r
100 \r
101   /**\r
102    * @return The value of the {@code serviceAddress} attribute\r
103    */\r
104   @JsonProperty(value = "ServiceAddress")\r
105   @Override\r
106   public String getServiceAddress() {\r
107     return serviceAddress;\r
108   }\r
109 \r
110   /**\r
111    * @return The value of the {@code servicePort} attribute\r
112    */\r
113   @JsonProperty(value = "ServicePort")\r
114   @Override\r
115   public int getServicePort() {\r
116     return servicePort;\r
117   }\r
118 \r
119   /**\r
120    * @return The value of the {@code serviceTags} attribute\r
121    */\r
122   @JsonProperty(value = "ServiceTags")\r
123   @Override\r
124   public ImmutableList<String> getServiceTags() {\r
125     return serviceTags;\r
126   }\r
127 \r
128   /**\r
129    * Copy the current immutable object by setting a value for the {@link CatalogService#getNode() node} attribute.\r
130    * An equals check used to prevent copying of the same value by returning {@code this}.\r
131    * @param value A new value for node\r
132    * @return A modified copy of the {@code this} object\r
133    */\r
134   public final ImmutableCatalogService withNode(String value) {\r
135     if (this.node.equals(value)) return this;\r
136     return new ImmutableCatalogService(\r
137         Preconditions.checkNotNull(value, "node"),\r
138         this.address,\r
139         this.serviceName,\r
140         this.serviceId,\r
141         this.serviceAddress,\r
142         this.servicePort,\r
143         this.serviceTags);\r
144   }\r
145 \r
146   /**\r
147    * Copy the current immutable object by setting a value for the {@link CatalogService#getAddress() address} attribute.\r
148    * An equals check used to prevent copying of the same value by returning {@code this}.\r
149    * @param value A new value for address\r
150    * @return A modified copy of the {@code this} object\r
151    */\r
152   public final ImmutableCatalogService withAddress(String value) {\r
153     if (this.address.equals(value)) return this;\r
154     return new ImmutableCatalogService(\r
155         this.node,\r
156         Preconditions.checkNotNull(value, "address"),\r
157         this.serviceName,\r
158         this.serviceId,\r
159         this.serviceAddress,\r
160         this.servicePort,\r
161         this.serviceTags);\r
162   }\r
163 \r
164   /**\r
165    * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceName() serviceName} attribute.\r
166    * An equals check used to prevent copying of the same value by returning {@code this}.\r
167    * @param value A new value for serviceName\r
168    * @return A modified copy of the {@code this} object\r
169    */\r
170   public final ImmutableCatalogService withServiceName(String value) {\r
171     if (this.serviceName.equals(value)) return this;\r
172     return new ImmutableCatalogService(\r
173         this.node,\r
174         this.address,\r
175         Preconditions.checkNotNull(value, "serviceName"),\r
176         this.serviceId,\r
177         this.serviceAddress,\r
178         this.servicePort,\r
179         this.serviceTags);\r
180   }\r
181 \r
182   /**\r
183    * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceId() serviceId} attribute.\r
184    * An equals check used to prevent copying of the same value by returning {@code this}.\r
185    * @param value A new value for serviceId\r
186    * @return A modified copy of the {@code this} object\r
187    */\r
188   public final ImmutableCatalogService withServiceId(String value) {\r
189     if (this.serviceId.equals(value)) return this;\r
190     return new ImmutableCatalogService(\r
191         this.node,\r
192         this.address,\r
193         this.serviceName,\r
194         Preconditions.checkNotNull(value, "serviceId"),\r
195         this.serviceAddress,\r
196         this.servicePort,\r
197         this.serviceTags);\r
198   }\r
199 \r
200   /**\r
201    * Copy the current immutable object by setting a value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.\r
202    * An equals check used to prevent copying of the same value by returning {@code this}.\r
203    * @param value A new value for serviceAddress\r
204    * @return A modified copy of the {@code this} object\r
205    */\r
206   public final ImmutableCatalogService withServiceAddress(String value) {\r
207     if (this.serviceAddress.equals(value)) return this;\r
208     return new ImmutableCatalogService(\r
209         this.node,\r
210         this.address,\r
211         this.serviceName,\r
212         this.serviceId,\r
213         Preconditions.checkNotNull(value, "serviceAddress"),\r
214         this.servicePort,\r
215         this.serviceTags);\r
216   }\r
217 \r
218   /**\r
219    * Copy the current immutable object by setting a value for the {@link CatalogService#getServicePort() servicePort} attribute.\r
220    * A value equality check is used to prevent copying of the same value by returning {@code this}.\r
221    * @param value A new value for servicePort\r
222    * @return A modified copy of the {@code this} object\r
223    */\r
224   public final ImmutableCatalogService withServicePort(int value) {\r
225     if (this.servicePort == value) return this;\r
226     return new ImmutableCatalogService(\r
227         this.node,\r
228         this.address,\r
229         this.serviceName,\r
230         this.serviceId,\r
231         this.serviceAddress,\r
232         value,\r
233         this.serviceTags);\r
234   }\r
235 \r
236   /**\r
237    * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.\r
238    * @param elements The elements to set\r
239    * @return A modified copy of {@code this} object\r
240    */\r
241   public final ImmutableCatalogService withServiceTags(String... elements) {\r
242     ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
243     return new ImmutableCatalogService(\r
244         this.node,\r
245         this.address,\r
246         this.serviceName,\r
247         this.serviceId,\r
248         this.serviceAddress,\r
249         this.servicePort,\r
250         newValue);\r
251   }\r
252 \r
253   /**\r
254    * Copy the current immutable object with elements that replace the content of {@link CatalogService#getServiceTags() serviceTags}.\r
255    * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.\r
256    * @param elements An iterable of serviceTags elements to set\r
257    * @return A modified copy of {@code this} object\r
258    */\r
259   public final ImmutableCatalogService withServiceTags(Iterable<String> elements) {\r
260     if (this.serviceTags == elements) return this;\r
261     ImmutableList<String> newValue = ImmutableList.copyOf(elements);\r
262     return new ImmutableCatalogService(\r
263         this.node,\r
264         this.address,\r
265         this.serviceName,\r
266         this.serviceId,\r
267         this.serviceAddress,\r
268         this.servicePort,\r
269         newValue);\r
270   }\r
271 \r
272   /**\r
273    * This instance is equal to all instances of {@code ImmutableCatalogService} that have equal attribute values.\r
274    * @return {@code true} if {@code this} is equal to {@code another} instance\r
275    */\r
276   @Override\r
277   public boolean equals(Object another) {\r
278     if (this == another) return true;\r
279     return another instanceof ImmutableCatalogService\r
280         && equalTo((ImmutableCatalogService) another);\r
281   }\r
282 \r
283   private boolean equalTo(ImmutableCatalogService another) {\r
284     return node.equals(another.node)\r
285         && address.equals(another.address)\r
286         && serviceName.equals(another.serviceName)\r
287         && serviceId.equals(another.serviceId)\r
288         && serviceAddress.equals(another.serviceAddress)\r
289         && servicePort == another.servicePort\r
290         && serviceTags.equals(another.serviceTags);\r
291   }\r
292 \r
293   /**\r
294    * Computes a hash code from attributes: {@code node}, {@code address}, {@code serviceName}, {@code serviceId}, {@code serviceAddress}, {@code servicePort}, {@code serviceTags}.\r
295    * @return hashCode value\r
296    */\r
297   @Override\r
298   public int hashCode() {\r
299     int h = 31;\r
300     h = h * 17 + node.hashCode();\r
301     h = h * 17 + address.hashCode();\r
302     h = h * 17 + serviceName.hashCode();\r
303     h = h * 17 + serviceId.hashCode();\r
304     h = h * 17 + serviceAddress.hashCode();\r
305     h = h * 17 + servicePort;\r
306     h = h * 17 + serviceTags.hashCode();\r
307     return h;\r
308   }\r
309 \r
310   /**\r
311    * Prints the immutable value {@code CatalogService...} with all non-generated\r
312    * and non-auxiliary attribute values.\r
313    * @return A string representation of the value\r
314    */\r
315   @Override\r
316   public String toString() {\r
317     return MoreObjects.toStringHelper("CatalogService")\r
318         .add("node", node)\r
319         .add("address", address)\r
320         .add("serviceName", serviceName)\r
321         .add("serviceId", serviceId)\r
322         .add("serviceAddress", serviceAddress)\r
323         .add("servicePort", servicePort)\r
324         .add("serviceTags", serviceTags)\r
325         .toString();\r
326   }\r
327 \r
328   /**\r
329    * Utility type used to correctly read immutable object from JSON representation.\r
330    * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
331    */\r
332   @Deprecated\r
333   @JsonDeserialize\r
334   static final class Json extends CatalogService {\r
335     String node;\r
336     String address;\r
337     String serviceName;\r
338     String serviceId;\r
339     String serviceAddress;\r
340     Integer servicePort;\r
341     List<String> serviceTags = ImmutableList.of();\r
342     @JsonProperty(value = "Node")\r
343     public void setNode(String node) {\r
344       this.node = node;\r
345     }\r
346     @JsonProperty(value = "Address")\r
347     public void setAddress(String address) {\r
348       this.address = address;\r
349     }\r
350     @JsonProperty(value = "ServiceName")\r
351     public void setServiceName(String serviceName) {\r
352       this.serviceName = serviceName;\r
353     }\r
354     @JsonProperty(value = "ServiceID")\r
355     public void setServiceId(String serviceId) {\r
356       this.serviceId = serviceId;\r
357     }\r
358     @JsonProperty(value = "ServiceAddress")\r
359     public void setServiceAddress(String serviceAddress) {\r
360       this.serviceAddress = serviceAddress;\r
361     }\r
362     @JsonProperty(value = "ServicePort")\r
363     public void setServicePort(int servicePort) {\r
364       this.servicePort = servicePort;\r
365     }\r
366     @JsonProperty(value = "ServiceTags")\r
367     public void setServiceTags(List<String> serviceTags) {\r
368       this.serviceTags = serviceTags;\r
369     }\r
370     @Override\r
371     public String getNode() { throw new UnsupportedOperationException(); }\r
372     @Override\r
373     public String getAddress() { throw new UnsupportedOperationException(); }\r
374     @Override\r
375     public String getServiceName() { throw new UnsupportedOperationException(); }\r
376     @Override\r
377     public String getServiceId() { throw new UnsupportedOperationException(); }\r
378     @Override\r
379     public String getServiceAddress() { throw new UnsupportedOperationException(); }\r
380     @Override\r
381     public int getServicePort() { throw new UnsupportedOperationException(); }\r
382     @Override\r
383     public List<String> getServiceTags() { throw new UnsupportedOperationException(); }\r
384   }\r
385 \r
386   /**\r
387    * @param json A JSON-bindable data structure\r
388    * @return An immutable value type\r
389    * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure\r
390    */\r
391   @Deprecated\r
392   @JsonCreator\r
393   static ImmutableCatalogService fromJson(Json json) {\r
394     ImmutableCatalogService.Builder builder = ImmutableCatalogService.builder();\r
395     if (json.node != null) {\r
396       builder.node(json.node);\r
397     }\r
398     if (json.address != null) {\r
399       builder.address(json.address);\r
400     }\r
401     if (json.serviceName != null) {\r
402       builder.serviceName(json.serviceName);\r
403     }\r
404     if (json.serviceId != null) {\r
405       builder.serviceId(json.serviceId);\r
406     }\r
407     if (json.serviceAddress != null) {\r
408       builder.serviceAddress(json.serviceAddress);\r
409     }\r
410     if (json.servicePort != null) {\r
411       builder.servicePort(json.servicePort);\r
412     }\r
413     if (json.serviceTags != null) {\r
414       builder.addAllServiceTags(json.serviceTags);\r
415     }\r
416     return builder.build();\r
417   }\r
418 \r
419   /**\r
420    * Creates an immutable copy of a {@link CatalogService} value.\r
421    * Uses accessors to get values to initialize the new immutable instance.\r
422    * If an instance is already immutable, it is returned as is.\r
423    * @param instance The instance to copy\r
424    * @return A copied immutable CatalogService instance\r
425    */\r
426   public static ImmutableCatalogService copyOf(CatalogService instance) {\r
427     if (instance instanceof ImmutableCatalogService) {\r
428       return (ImmutableCatalogService) instance;\r
429     }\r
430     return ImmutableCatalogService.builder()\r
431         .from(instance)\r
432         .build();\r
433   }\r
434 \r
435   /**\r
436    * Creates a builder for {@link ImmutableCatalogService ImmutableCatalogService}.\r
437    * @return A new ImmutableCatalogService builder\r
438    */\r
439   public static ImmutableCatalogService.Builder builder() {\r
440     return new ImmutableCatalogService.Builder();\r
441   }\r
442 \r
443   /**\r
444    * Builds instances of type {@link ImmutableCatalogService ImmutableCatalogService}.\r
445    * Initialize attributes and then invoke the {@link #build()} method to create an\r
446    * immutable instance.\r
447    * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,\r
448    * but instead used immediately to create instances.</em>\r
449    */\r
450   public static final class Builder {\r
451     private static final long INIT_BIT_NODE = 0x1L;\r
452     private static final long INIT_BIT_ADDRESS = 0x2L;\r
453     private static final long INIT_BIT_SERVICE_NAME = 0x4L;\r
454     private static final long INIT_BIT_SERVICE_ID = 0x8L;\r
455     private static final long INIT_BIT_SERVICE_ADDRESS = 0x10L;\r
456     private static final long INIT_BIT_SERVICE_PORT = 0x20L;\r
457     private long initBits = 0x3f;\r
458 \r
459     private String node;\r
460     private String address;\r
461     private String serviceName;\r
462     private String serviceId;\r
463     private String serviceAddress;\r
464     private int servicePort;\r
465     private ImmutableList.Builder<String> serviceTagsBuilder = ImmutableList.builder();\r
466 \r
467     private Builder() {\r
468     }\r
469 \r
470     /**\r
471      * Fill a builder with attribute values from the provided {@code CatalogService} instance.\r
472      * Regular attribute values will be replaced with those from the given instance.\r
473      * Absent optional values will not replace present values.\r
474      * Collection elements and entries will be added, not replaced.\r
475      * @param instance The instance from which to copy values\r
476      * @return {@code this} builder for use in a chained invocation\r
477      */\r
478     public final Builder from(CatalogService instance) {\r
479       Preconditions.checkNotNull(instance, "instance");\r
480       node(instance.getNode());\r
481       address(instance.getAddress());\r
482       serviceName(instance.getServiceName());\r
483       serviceId(instance.getServiceId());\r
484       serviceAddress(instance.getServiceAddress());\r
485       servicePort(instance.getServicePort());\r
486       addAllServiceTags(instance.getServiceTags());\r
487       return this;\r
488     }\r
489 \r
490     /**\r
491      * Initializes the value for the {@link CatalogService#getNode() node} attribute.\r
492      * @param node The value for node \r
493      * @return {@code this} builder for use in a chained invocation\r
494      */\r
495     public final Builder node(String node) {\r
496       this.node = Preconditions.checkNotNull(node, "node");\r
497       initBits &= ~INIT_BIT_NODE;\r
498       return this;\r
499     }\r
500 \r
501     /**\r
502      * Initializes the value for the {@link CatalogService#getAddress() address} attribute.\r
503      * @param address The value for address \r
504      * @return {@code this} builder for use in a chained invocation\r
505      */\r
506     public final Builder address(String address) {\r
507       this.address = Preconditions.checkNotNull(address, "address");\r
508       initBits &= ~INIT_BIT_ADDRESS;\r
509       return this;\r
510     }\r
511 \r
512     /**\r
513      * Initializes the value for the {@link CatalogService#getServiceName() serviceName} attribute.\r
514      * @param serviceName The value for serviceName \r
515      * @return {@code this} builder for use in a chained invocation\r
516      */\r
517     public final Builder serviceName(String serviceName) {\r
518       this.serviceName = Preconditions.checkNotNull(serviceName, "serviceName");\r
519       initBits &= ~INIT_BIT_SERVICE_NAME;\r
520       return this;\r
521     }\r
522 \r
523     /**\r
524      * Initializes the value for the {@link CatalogService#getServiceId() serviceId} attribute.\r
525      * @param serviceId The value for serviceId \r
526      * @return {@code this} builder for use in a chained invocation\r
527      */\r
528     public final Builder serviceId(String serviceId) {\r
529       this.serviceId = Preconditions.checkNotNull(serviceId, "serviceId");\r
530       initBits &= ~INIT_BIT_SERVICE_ID;\r
531       return this;\r
532     }\r
533 \r
534     /**\r
535      * Initializes the value for the {@link CatalogService#getServiceAddress() serviceAddress} attribute.\r
536      * @param serviceAddress The value for serviceAddress \r
537      * @return {@code this} builder for use in a chained invocation\r
538      */\r
539     public final Builder serviceAddress(String serviceAddress) {\r
540       this.serviceAddress = Preconditions.checkNotNull(serviceAddress, "serviceAddress");\r
541       initBits &= ~INIT_BIT_SERVICE_ADDRESS;\r
542       return this;\r
543     }\r
544 \r
545     /**\r
546      * Initializes the value for the {@link CatalogService#getServicePort() servicePort} attribute.\r
547      * @param servicePort The value for servicePort \r
548      * @return {@code this} builder for use in a chained invocation\r
549      */\r
550     public final Builder servicePort(int servicePort) {\r
551       this.servicePort = servicePort;\r
552       initBits &= ~INIT_BIT_SERVICE_PORT;\r
553       return this;\r
554     }\r
555 \r
556     /**\r
557      * Adds one element to {@link CatalogService#getServiceTags() serviceTags} list.\r
558      * @param element A serviceTags element\r
559      * @return {@code this} builder for use in a chained invocation\r
560      */\r
561     public final Builder addServiceTags(String element) {\r
562       serviceTagsBuilder.add(element);\r
563       return this;\r
564     }\r
565 \r
566     /**\r
567      * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.\r
568      * @param elements An array of serviceTags elements\r
569      * @return {@code this} builder for use in a chained invocation\r
570      */\r
571     public final Builder addServiceTags(String... elements) {\r
572       serviceTagsBuilder.add(elements);\r
573       return this;\r
574     }\r
575 \r
576     /**\r
577      * Sets or replaces all elements for {@link CatalogService#getServiceTags() serviceTags} list.\r
578      * @param elements An iterable of serviceTags elements\r
579      * @return {@code this} builder for use in a chained invocation\r
580      */\r
581     public final Builder serviceTags(Iterable<String> elements) {\r
582       serviceTagsBuilder = ImmutableList.builder();\r
583       return addAllServiceTags(elements);\r
584     }\r
585 \r
586     /**\r
587      * Adds elements to {@link CatalogService#getServiceTags() serviceTags} list.\r
588      * @param elements An iterable of serviceTags elements\r
589      * @return {@code this} builder for use in a chained invocation\r
590      */\r
591     public final Builder addAllServiceTags(Iterable<String> elements) {\r
592       serviceTagsBuilder.addAll(elements);\r
593       return this;\r
594     }\r
595 \r
596     /**\r
597      * Builds a new {@link ImmutableCatalogService ImmutableCatalogService}.\r
598      * @return An immutable instance of CatalogService\r
599      * @throws java.lang.IllegalStateException if any required attributes are missing\r
600      */\r
601     public ImmutableCatalogService build() throws IllegalStateException {\r
602       if (initBits != 0) {\r
603         throw new IllegalStateException(formatRequiredAttributesMessage());\r
604       }\r
605       return new ImmutableCatalogService(\r
606           node,\r
607           address,\r
608           serviceName,\r
609           serviceId,\r
610           serviceAddress,\r
611           servicePort,\r
612           serviceTagsBuilder.build());\r
613     }\r
614 \r
615     private String formatRequiredAttributesMessage() {\r
616       List<String> attributes = Lists.newArrayList();\r
617       if ((initBits & INIT_BIT_NODE) != 0) attributes.add("node");\r
618       if ((initBits & INIT_BIT_ADDRESS) != 0) attributes.add("address");\r
619       if ((initBits & INIT_BIT_SERVICE_NAME) != 0) attributes.add("serviceName");\r
620       if ((initBits & INIT_BIT_SERVICE_ID) != 0) attributes.add("serviceId");\r
621       if ((initBits & INIT_BIT_SERVICE_ADDRESS) != 0) attributes.add("serviceAddress");\r
622       if ((initBits & INIT_BIT_SERVICE_PORT) != 0) attributes.add("servicePort");\r
623       return "Cannot build CatalogService, some of required attributes are not set " + attributes;\r
624     }\r
625   }\r
626 }\r