test_class.declarator: AUTHORIZATION_CONTEXT =
              AuthorizationModelFactory.newAuthContext(DittoAuthorizationContextType.PRE_AUTHENTICATED_CONNECTION,
                      AuthorizationModelFactory.newAuthSubject("eclipse"),
                      AuthorizationModelFactory.newAuthSubject("ditto"))
test_class.modifier: private static final
test_class.original_string: private static final AuthorizationContext AUTHORIZATION_CONTEXT =
              AuthorizationModelFactory.newAuthContext(DittoAuthorizationContextType.PRE_AUTHENTICATED_CONNECTION,
                      AuthorizationModelFactory.newAuthSubject("eclipse"),
                      AuthorizationModelFactory.newAuthSubject("ditto"));
test_class.type: AuthorizationContext
test_class.var_name: AUTHORIZATION_CONTEXT
test_class.declarator: MAPPING
test_class.modifier: private static final
test_class.original_string: private static final Map<String, String> MAPPING;
test_class.type: Map<String, String>
test_class.var_name: MAPPING
test_class.declarator: FILTERED_ACKNOWLEDGEMENT_REQUEST =
              FilteredAcknowledgementRequest.of(new HashSet<>(
                              Arrays.asList(AcknowledgementRequest.of(AcknowledgementLabel.of("custom-ack")),
                                      AcknowledgementRequest.of(AcknowledgementLabel.of("second-custom-ack")))),
                      "fn:filter(header:qos,'ne',0)")
test_class.modifier: private static final
test_class.original_string: private static final FilteredAcknowledgementRequest FILTERED_ACKNOWLEDGEMENT_REQUEST =
              FilteredAcknowledgementRequest.of(new HashSet<>(
                              Arrays.asList(AcknowledgementRequest.of(AcknowledgementLabel.of("custom-ack")),
                                      AcknowledgementRequest.of(AcknowledgementLabel.of("second-custom-ack")))),
                      "fn:filter(header:qos,'ne',0)");
test_class.type: FilteredAcknowledgementRequest
test_class.var_name: FILTERED_ACKNOWLEDGEMENT_REQUEST
test_class.declarator: AMQP_SOURCE1 = "amqp/source1"
test_class.modifier: private static final
test_class.original_string: private static final String AMQP_SOURCE1 = "amqp/source1";
test_class.type: String
test_class.var_name: AMQP_SOURCE1
test_class.declarator: DITTO_MAPPING = "ditto-mapping"
test_class.modifier: private static final
test_class.original_string: private static final String DITTO_MAPPING = "ditto-mapping";
test_class.type: String
test_class.var_name: DITTO_MAPPING
test_class.declarator: CUSTOM_MAPPING = "custom-mapping"
test_class.modifier: private static final
test_class.original_string: private static final String CUSTOM_MAPPING = "custom-mapping";
test_class.type: String
test_class.var_name: CUSTOM_MAPPING
test_class.declarator: SOURCE_WITH_AUTH_CONTEXT =
              ConnectivityModelFactory.newSourceBuilder()
                      .authorizationContext(AUTHORIZATION_CONTEXT)
                      .consumerCount(2)
                      .index(0)
                      .address(AMQP_SOURCE1)
                      .acknowledgementRequests(FILTERED_ACKNOWLEDGEMENT_REQUEST)
                      .headerMapping(ConnectivityModelFactory.newHeaderMapping(MAPPING))
                      .payloadMapping(ConnectivityModelFactory.newPayloadMapping(DITTO_MAPPING, CUSTOM_MAPPING))
                      .replyTarget(ImmutableReplyTargetTest.REPLY_TARGET)
                      .build()
test_class.modifier: private static final
test_class.original_string: private static final Source SOURCE_WITH_AUTH_CONTEXT =
              ConnectivityModelFactory.newSourceBuilder()
                      .authorizationContext(AUTHORIZATION_CONTEXT)
                      .consumerCount(2)
                      .index(0)
                      .address(AMQP_SOURCE1)
                      .acknowledgementRequests(FILTERED_ACKNOWLEDGEMENT_REQUEST)
                      .headerMapping(ConnectivityModelFactory.newHeaderMapping(MAPPING))
                      .payloadMapping(ConnectivityModelFactory.newPayloadMapping(DITTO_MAPPING, CUSTOM_MAPPING))
                      .replyTarget(ImmutableReplyTargetTest.REPLY_TARGET)
                      .build();
test_class.type: Source
test_class.var_name: SOURCE_WITH_AUTH_CONTEXT
test_class.declarator: SOURCE_JSON = JsonObject
              .newBuilder()
              .set(Source.JsonFields.ADDRESSES, JsonFactory.newArrayBuilder().add(AMQP_SOURCE1).build())
              .set(Source.JsonFields.CONSUMER_COUNT, 2)
              .set(Source.JsonFields.ACKNOWLEDGEMENT_REQUESTS,
                      JsonFactory.newObjectBuilder()
                              .set(FilteredAcknowledgementRequest.JsonFields.INCLUDES,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getIncludes()
                                              .stream()
                                              .map(AcknowledgementRequest::getLabel)
                                              .map(AcknowledgementLabel::toString)
                                              .map(JsonFactory::newValue)
                                              .collect(
                                                      JsonCollectors.valuesToArray()))
                              .set(FilteredAcknowledgementRequest.JsonFields.FILTER,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getFilter().orElse(null))
                              .build())
              .set(Source.JsonFields.HEADER_MAPPING,
                      JsonFactory.newObjectBuilder().setAll(MAPPING.entrySet().stream()
                              .map(e -> JsonFactory.newField(JsonFactory.newKey(e.getKey()), JsonValue.of(e.getValue())))
                              .collect(Collectors.toList())).build())
              .set(Source.JsonFields.PAYLOAD_MAPPING, JsonArray.of(DITTO_MAPPING, CUSTOM_MAPPING))
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject SOURCE_JSON = JsonObject
              .newBuilder()
              .set(Source.JsonFields.ADDRESSES, JsonFactory.newArrayBuilder().add(AMQP_SOURCE1).build())
              .set(Source.JsonFields.CONSUMER_COUNT, 2)
              .set(Source.JsonFields.ACKNOWLEDGEMENT_REQUESTS,
                      JsonFactory.newObjectBuilder()
                              .set(FilteredAcknowledgementRequest.JsonFields.INCLUDES,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getIncludes()
                                              .stream()
                                              .map(AcknowledgementRequest::getLabel)
                                              .map(AcknowledgementLabel::toString)
                                              .map(JsonFactory::newValue)
                                              .collect(
                                                      JsonCollectors.valuesToArray()))
                              .set(FilteredAcknowledgementRequest.JsonFields.FILTER,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getFilter().orElse(null))
                              .build())
              .set(Source.JsonFields.HEADER_MAPPING,
                      JsonFactory.newObjectBuilder().setAll(MAPPING.entrySet().stream()
                              .map(e -> JsonFactory.newField(JsonFactory.newKey(e.getKey()), JsonValue.of(e.getValue())))
                              .collect(Collectors.toList())).build())
              .set(Source.JsonFields.PAYLOAD_MAPPING, JsonArray.of(DITTO_MAPPING, CUSTOM_MAPPING))
              .build();
test_class.type: JsonObject
test_class.var_name: SOURCE_JSON
test_class.declarator: SOURCE_JSON_WITH_AUTH_CONTEXT = SOURCE_JSON.toBuilder()
              .set(Source.JsonFields.AUTHORIZATION_CONTEXT, JsonFactory.newArrayBuilder().add("eclipse", "ditto").build())
              .set(Source.JsonFields.REPLY_TARGET, ImmutableReplyTargetTest.REPLY_TARGET_JSON)
              .set(Source.JsonFields.REPLY_TARGET_ENABLED, true)
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject SOURCE_JSON_WITH_AUTH_CONTEXT = SOURCE_JSON.toBuilder()
              .set(Source.JsonFields.AUTHORIZATION_CONTEXT, JsonFactory.newArrayBuilder().add("eclipse", "ditto").build())
              .set(Source.JsonFields.REPLY_TARGET, ImmutableReplyTargetTest.REPLY_TARGET_JSON)
              .set(Source.JsonFields.REPLY_TARGET_ENABLED, true)
              .build();
test_class.type: JsonObject
test_class.var_name: SOURCE_JSON_WITH_AUTH_CONTEXT
test_class.declarator: MQTT_SOURCE1 = "mqtt/source1"
test_class.modifier: private static final
test_class.original_string: private static final String MQTT_SOURCE1 = "mqtt/source1";
test_class.type: String
test_class.var_name: MQTT_SOURCE1
test_class.declarator: MQTT_FILTER = "topic/{{ thing.id }}"
test_class.modifier: private static final
test_class.original_string: private static final String MQTT_FILTER = "topic/{{ thing.id }}";
test_class.type: String
test_class.var_name: MQTT_FILTER
test_class.declarator: ENFORCEMENT = ConnectivityModelFactory.newEnforcement("{{ topic }}", MQTT_FILTER)
test_class.modifier: private static final
test_class.original_string: private static final Enforcement ENFORCEMENT = ConnectivityModelFactory.newEnforcement("{{ topic }}", MQTT_FILTER);
test_class.type: Enforcement
test_class.var_name: ENFORCEMENT
test_class.declarator: MQTT_SOURCE = ConnectivityModelFactory
              .newSourceBuilder()
              .authorizationContext(AUTHORIZATION_CONTEXT)
              .address(MQTT_SOURCE1)
              .enforcement(ENFORCEMENT)
              .acknowledgementRequests(FILTERED_ACKNOWLEDGEMENT_REQUEST)
              .consumerCount(2)
              .index(0)
              .qos(1)
              .build()
test_class.modifier: private static final
test_class.original_string: private static final Source MQTT_SOURCE = ConnectivityModelFactory
              .newSourceBuilder()
              .authorizationContext(AUTHORIZATION_CONTEXT)
              .address(MQTT_SOURCE1)
              .enforcement(ENFORCEMENT)
              .acknowledgementRequests(FILTERED_ACKNOWLEDGEMENT_REQUEST)
              .consumerCount(2)
              .index(0)
              .qos(1)
              .build();
test_class.type: Source
test_class.var_name: MQTT_SOURCE
test_class.declarator: MQTT_SOURCE_JSON = JsonObject
              .newBuilder()
              .set(Source.JsonFields.ADDRESSES, JsonFactory.newArrayBuilder().add(MQTT_SOURCE1).build())
              .set(Source.JsonFields.CONSUMER_COUNT, 2)
              .set(Source.JsonFields.QOS, 1)
              .set(Source.JsonFields.AUTHORIZATION_CONTEXT, JsonFactory.newArrayBuilder().add("eclipse", "ditto").build())
              .set(Source.JsonFields.ENFORCEMENT, JsonFactory.newObjectBuilder()
                      .set(Enforcement.JsonFields.INPUT, "{{ topic }}")
                      .set(Enforcement.JsonFields.FILTERS, JsonFactory.newArrayBuilder().add(MQTT_FILTER).build())
                      .build())
              .set(Source.JsonFields.ACKNOWLEDGEMENT_REQUESTS,
                      JsonFactory.newObjectBuilder()
                              .set(FilteredAcknowledgementRequest.JsonFields.INCLUDES,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getIncludes()
                                              .stream()
                                              .map(AcknowledgementRequest::getLabel)
                                              .map(AcknowledgementLabel::toString)
                                              .map(JsonFactory::newValue)
                                              .collect(
                                                      JsonCollectors.valuesToArray()))
                              .set(FilteredAcknowledgementRequest.JsonFields.FILTER,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getFilter().orElse(null))
                              .build())
              .build()
test_class.modifier: private static final
test_class.original_string: private static final JsonObject MQTT_SOURCE_JSON = JsonObject
              .newBuilder()
              .set(Source.JsonFields.ADDRESSES, JsonFactory.newArrayBuilder().add(MQTT_SOURCE1).build())
              .set(Source.JsonFields.CONSUMER_COUNT, 2)
              .set(Source.JsonFields.QOS, 1)
              .set(Source.JsonFields.AUTHORIZATION_CONTEXT, JsonFactory.newArrayBuilder().add("eclipse", "ditto").build())
              .set(Source.JsonFields.ENFORCEMENT, JsonFactory.newObjectBuilder()
                      .set(Enforcement.JsonFields.INPUT, "{{ topic }}")
                      .set(Enforcement.JsonFields.FILTERS, JsonFactory.newArrayBuilder().add(MQTT_FILTER).build())
                      .build())
              .set(Source.JsonFields.ACKNOWLEDGEMENT_REQUESTS,
                      JsonFactory.newObjectBuilder()
                              .set(FilteredAcknowledgementRequest.JsonFields.INCLUDES,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getIncludes()
                                              .stream()
                                              .map(AcknowledgementRequest::getLabel)
                                              .map(AcknowledgementLabel::toString)
                                              .map(JsonFactory::newValue)
                                              .collect(
                                                      JsonCollectors.valuesToArray()))
                              .set(FilteredAcknowledgementRequest.JsonFields.FILTER,
                                      FILTERED_ACKNOWLEDGEMENT_REQUEST.getFilter().orElse(null))
                              .build())
              .build();
test_class.type: JsonObject
test_class.var_name: MQTT_SOURCE_JSON
test_class.file: model/connectivity/src/test/java/org/eclipse/ditto/model/connectivity/ImmutableSourceTest.java
test_class.identifier: ImmutableSourceTest
test_case.body: @Test
      public void mqttFromJsonReturnsExpected() {
          final Source actual = ImmutableSource.fromJson(MQTT_SOURCE_JSON, 0);
  
          assertThat(actual).isEqualTo(MQTT_SOURCE);
      }
test_case.class_method_signature: ImmutableSourceTest.mqttFromJsonReturnsExpected()
test_case.full_signature: @Test public void mqttFromJsonReturnsExpected()
test_case.identifier: mqttFromJsonReturnsExpected
test_case.invocations: fromJson isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mqttFromJsonReturnsExpected()
focal_class.declarator: DEFAULT_REPLY_TARGET_ADDRESS = "{{header:reply-to}}"
focal_class.modifier: static final
focal_class.original_string: static final String DEFAULT_REPLY_TARGET_ADDRESS = "{{header:reply-to}}";
focal_class.type: String
focal_class.var_name: DEFAULT_REPLY_TARGET_ADDRESS
focal_class.declarator: HEADER_CORRELATION_ID = "{{header:correlation-id}}"
focal_class.modifier: private static final
focal_class.original_string: private static final String HEADER_CORRELATION_ID = "{{header:correlation-id}}";
focal_class.type: String
focal_class.var_name: HEADER_CORRELATION_ID
focal_class.declarator: HEADER_CONTENT_TYPE = "{{header:content-type}}"
focal_class.modifier: private static final
focal_class.original_string: private static final String HEADER_CONTENT_TYPE = "{{header:content-type}}";
focal_class.type: String
focal_class.var_name: HEADER_CONTENT_TYPE
focal_class.declarator: DEFAULT_SOURCE_HEADER_MAPPING =
              ConnectivityModelFactory.newHeaderMapping(JsonObject.newBuilder()
                      .set("correlation-id", HEADER_CORRELATION_ID)
                      .set("content-type", HEADER_CONTENT_TYPE)
                      .set("reply-to", DEFAULT_REPLY_TARGET_ADDRESS)
                      .build())
focal_class.modifier: static final
focal_class.original_string: static final HeaderMapping DEFAULT_SOURCE_HEADER_MAPPING =
              ConnectivityModelFactory.newHeaderMapping(JsonObject.newBuilder()
                      .set("correlation-id", HEADER_CORRELATION_ID)
                      .set("content-type", HEADER_CONTENT_TYPE)
                      .set("reply-to", DEFAULT_REPLY_TARGET_ADDRESS)
                      .build());
focal_class.type: HeaderMapping
focal_class.var_name: DEFAULT_SOURCE_HEADER_MAPPING
focal_class.declarator: DEFAULT_REPLY_TARGET_HEADER_MAPPING =
              ConnectivityModelFactory.newHeaderMapping(JsonObject.newBuilder()
                      .set("correlation-id", HEADER_CORRELATION_ID)
                      .set("content-type", HEADER_CONTENT_TYPE)
                      .build())
focal_class.modifier: static final
focal_class.original_string: static final HeaderMapping DEFAULT_REPLY_TARGET_HEADER_MAPPING =
              ConnectivityModelFactory.newHeaderMapping(JsonObject.newBuilder()
                      .set("correlation-id", HEADER_CORRELATION_ID)
                      .set("content-type", HEADER_CONTENT_TYPE)
                      .build());
focal_class.type: HeaderMapping
focal_class.var_name: DEFAULT_REPLY_TARGET_HEADER_MAPPING
focal_class.declarator: DEFAULT_CONSUMER_COUNT = 1
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_CONSUMER_COUNT = 1;
focal_class.type: int
focal_class.var_name: DEFAULT_CONSUMER_COUNT
focal_class.declarator: DEFAULT_INDEX = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_INDEX = 0;
focal_class.type: int
focal_class.var_name: DEFAULT_INDEX
focal_class.declarator: DEFAULT_REPLY_TARGET_ENABLED = true
focal_class.modifier: private static final
focal_class.original_string: private static final boolean DEFAULT_REPLY_TARGET_ENABLED = true;
focal_class.type: boolean
focal_class.var_name: DEFAULT_REPLY_TARGET_ENABLED
focal_class.declarator: addresses
focal_class.modifier: private final
focal_class.original_string: private final Set<String> addresses;
focal_class.type: Set<String>
focal_class.var_name: addresses
focal_class.declarator: consumerCount
focal_class.modifier: private final
focal_class.original_string: private final int consumerCount;
focal_class.type: int
focal_class.var_name: consumerCount
focal_class.declarator: qos
focal_class.modifier: @Nullable private final
focal_class.original_string: @Nullable private final Integer qos;
focal_class.type: Integer
focal_class.var_name: qos
focal_class.declarator: index
focal_class.modifier: private final
focal_class.original_string: private final int index;
focal_class.type: int
focal_class.var_name: index
focal_class.declarator: authorizationContext
focal_class.modifier: private final
focal_class.original_string: private final AuthorizationContext authorizationContext;
focal_class.type: AuthorizationContext
focal_class.var_name: authorizationContext
focal_class.declarator: enforcement
focal_class.modifier: @Nullable private final
focal_class.original_string: @Nullable private final Enforcement enforcement;
focal_class.type: Enforcement
focal_class.var_name: enforcement
focal_class.declarator: acknowledgementRequests
focal_class.modifier: @Nullable private final
focal_class.original_string: @Nullable private final FilteredAcknowledgementRequest acknowledgementRequests;
focal_class.type: FilteredAcknowledgementRequest
focal_class.var_name: acknowledgementRequests
focal_class.declarator: headerMapping
focal_class.modifier: @Nullable private final
focal_class.original_string: @Nullable private final HeaderMapping headerMapping;
focal_class.type: HeaderMapping
focal_class.var_name: headerMapping
focal_class.declarator: payloadMapping
focal_class.modifier: private final
focal_class.original_string: private final PayloadMapping payloadMapping;
focal_class.type: PayloadMapping
focal_class.var_name: payloadMapping
focal_class.declarator: replyTargetEnabled
focal_class.modifier: private final
focal_class.original_string: private final boolean replyTargetEnabled;
focal_class.type: boolean
focal_class.var_name: replyTargetEnabled
focal_class.declarator: replyTarget
focal_class.modifier: @Nullable private final
focal_class.original_string: @Nullable private final ReplyTarget replyTarget;
focal_class.type: ReplyTarget
focal_class.var_name: replyTarget
focal_class.file: model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ImmutableSource.java
focal_class.identifier: ImmutableSource
focal_class.interfaces: implements Source
focal_class.class_method_signature: ImmutableSource.ImmutableSource(final Builder builder)
focal_class.full_signature: private  ImmutableSource(final Builder builder)
focal_class.identifier: ImmutableSource
focal_class.modifiers: private
focal_class.parameters: (final Builder builder)
focal_class.signature:  ImmutableSource(final Builder builder)
focal_class.class_method_signature: ImmutableSource.getAddresses()
focal_class.full_signature: @Override public Set<String> getAddresses()
focal_class.identifier: getAddresses
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getAddresses()
focal_class.class_method_signature: ImmutableSource.getConsumerCount()
focal_class.full_signature: @Override public int getConsumerCount()
focal_class.identifier: getConsumerCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getConsumerCount()
focal_class.class_method_signature: ImmutableSource.getAuthorizationContext()
focal_class.full_signature: @Override public AuthorizationContext getAuthorizationContext()
focal_class.identifier: getAuthorizationContext
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: AuthorizationContext
focal_class.signature: AuthorizationContext getAuthorizationContext()
focal_class.class_method_signature: ImmutableSource.getIndex()
focal_class.full_signature: @Override public int getIndex()
focal_class.identifier: getIndex
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getIndex()
focal_class.class_method_signature: ImmutableSource.getQos()
focal_class.full_signature: @Override public Optional<Integer> getQos()
focal_class.identifier: getQos
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<Integer>
focal_class.signature: Optional<Integer> getQos()
focal_class.class_method_signature: ImmutableSource.getEnforcement()
focal_class.full_signature: @Override public Optional<Enforcement> getEnforcement()
focal_class.identifier: getEnforcement
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<Enforcement>
focal_class.signature: Optional<Enforcement> getEnforcement()
focal_class.class_method_signature: ImmutableSource.getAcknowledgementRequests()
focal_class.full_signature: @Override public Optional<FilteredAcknowledgementRequest> getAcknowledgementRequests()
focal_class.identifier: getAcknowledgementRequests
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<FilteredAcknowledgementRequest>
focal_class.signature: Optional<FilteredAcknowledgementRequest> getAcknowledgementRequests()
focal_class.class_method_signature: ImmutableSource.getHeaderMapping()
focal_class.full_signature: @Override public Optional<HeaderMapping> getHeaderMapping()
focal_class.identifier: getHeaderMapping
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<HeaderMapping>
focal_class.signature: Optional<HeaderMapping> getHeaderMapping()
focal_class.class_method_signature: ImmutableSource.getPayloadMapping()
focal_class.full_signature: @Override public PayloadMapping getPayloadMapping()
focal_class.identifier: getPayloadMapping
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: PayloadMapping
focal_class.signature: PayloadMapping getPayloadMapping()
focal_class.class_method_signature: ImmutableSource.getReplyTarget()
focal_class.full_signature: @Override public Optional<ReplyTarget> getReplyTarget()
focal_class.identifier: getReplyTarget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Optional<ReplyTarget>
focal_class.signature: Optional<ReplyTarget> getReplyTarget()
focal_class.class_method_signature: ImmutableSource.isReplyTargetEnabled()
focal_class.full_signature: @Override public boolean isReplyTargetEnabled()
focal_class.identifier: isReplyTargetEnabled
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isReplyTargetEnabled()
focal_class.class_method_signature: ImmutableSource.toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.full_signature: @Override public JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.identifier: toJson
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.return: JsonObject
focal_class.signature: JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate)
focal_class.class_method_signature: ImmutableSource.fromJson(final JsonObject jsonObject, final int index)
focal_class.full_signature: public static Source fromJson(final JsonObject jsonObject, final int index)
focal_class.identifier: fromJson
focal_class.modifiers: public static
focal_class.parameters: (final JsonObject jsonObject, final int index)
focal_class.return: Source
focal_class.signature: Source fromJson(final JsonObject jsonObject, final int index)
focal_class.class_method_signature: ImmutableSource.equals(final Object o)
focal_class.full_signature: @Override public boolean equals(final Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (final Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(final Object o)
focal_class.class_method_signature: ImmutableSource.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: ImmutableSource.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: ImmutableSource.migrateReplyTarget(final Source source, final ConnectionType connectionType)
focal_class.full_signature: static Source migrateReplyTarget(final Source source, final ConnectionType connectionType)
focal_class.identifier: migrateReplyTarget
focal_class.modifiers: static
focal_class.parameters: (final Source source, final ConnectionType connectionType)
focal_class.return: Source
focal_class.signature: Source migrateReplyTarget(final Source source, final ConnectionType connectionType)
focal_class.class_method_signature: ImmutableSource.migrateReplyTargetWithoutHeaders(final Source source)
focal_class.full_signature: private static Source migrateReplyTargetWithoutHeaders(final Source source)
focal_class.identifier: migrateReplyTargetWithoutHeaders
focal_class.modifiers: private static
focal_class.parameters: (final Source source)
focal_class.return: Source
focal_class.signature: Source migrateReplyTargetWithoutHeaders(final Source source)
focal_class.class_method_signature: ImmutableSource.migrateReplyTargetWithHeaders(final Source source)
focal_class.full_signature: private static Source migrateReplyTargetWithHeaders(final Source source)
focal_class.identifier: migrateReplyTargetWithHeaders
focal_class.modifiers: private static
focal_class.parameters: (final Source source)
focal_class.return: Source
focal_class.signature: Source migrateReplyTargetWithHeaders(final Source source)
focal_method.body: public static Source fromJson(final JsonObject jsonObject, final int index) {
          final Set<String> readSources = jsonObject.getValue(JsonFields.ADDRESSES)
                  .map(array -> array.stream()
                          .map(JsonValue::asString)
                          .collect(Collectors.toSet())).orElse(Collections.emptySet());
          final int readConsumerCount =
                  jsonObject.getValue(JsonFields.CONSUMER_COUNT).orElse(DEFAULT_CONSUMER_COUNT);
          final Integer readQos = jsonObject.getValue(JsonFields.QOS).orElse(null);
          final JsonArray authContext = jsonObject.getValue(JsonFields.AUTHORIZATION_CONTEXT)
                  .orElseGet(() -> JsonArray.newBuilder().build());
          final List<AuthorizationSubject> authorizationSubjects = authContext.stream()
                  .filter(JsonValue::isString)
                  .map(JsonValue::asString)
                  .map(AuthorizationSubject::newInstance)
                  .collect(Collectors.toList());
          final AuthorizationContext readAuthorizationContext =
                  AuthorizationModelFactory.newAuthContext(DittoAuthorizationContextType.PRE_AUTHENTICATED_CONNECTION,
                          authorizationSubjects);
  
          final Enforcement readEnforcement =
                  jsonObject.getValue(JsonFields.ENFORCEMENT).map(ImmutableEnforcement::fromJson).orElse(null);
  
          final FilteredAcknowledgementRequest readAcknowledgementRequests =
                  jsonObject.getValue(JsonFields.ACKNOWLEDGEMENT_REQUESTS)
                          .map(FilteredAcknowledgementRequest::fromJson)
                          .orElse(null);
  
          final HeaderMapping readHeaderMapping =
                  jsonObject.getValue(JsonFields.HEADER_MAPPING).map(ImmutableHeaderMapping::fromJson).orElse(null);
  
          final PayloadMapping readPayloadMapping =
                  jsonObject.getValue(JsonFields.PAYLOAD_MAPPING)
                          .map(ImmutablePayloadMapping::fromJson)
                          .orElse(ConnectivityModelFactory.emptyPayloadMapping());
  
          final boolean replyTargetEnabled =
                  jsonObject.getValue(JsonFields.REPLY_TARGET_ENABLED).orElse(DEFAULT_REPLY_TARGET_ENABLED);
  
          final ReplyTarget readReplyTarget =
                  jsonObject.getValue(JsonFields.REPLY_TARGET)
                          .flatMap(ImmutableReplyTarget::fromJsonOptional)
                          .orElse(null);
  
          return new Builder()
                  .addresses(readSources)
                  .qos(readQos)
                  .authorizationContext(readAuthorizationContext)
                  .consumerCount(readConsumerCount)
                  .index(index)
                  .enforcement(readEnforcement)
                  .acknowledgementRequests(readAcknowledgementRequests)
                  .headerMapping(readHeaderMapping)
                  .payloadMapping(readPayloadMapping)
                  .replyTargetEnabled(replyTargetEnabled)
                  .replyTarget(readReplyTarget)
                  .build();
      }
focal_method.class_method_signature: ImmutableSource.fromJson(final JsonObject jsonObject, final int index)
focal_method.full_signature: public static Source fromJson(final JsonObject jsonObject, final int index)
focal_method.identifier: fromJson
focal_method.invocations: orElse map getValue collect map stream toSet emptySet orElse getValue orElse getValue orElseGet getValue build newBuilder collect map map filter stream toList newAuthContext orElse map getValue orElse map getValue orElse map getValue orElse map getValue emptyPayloadMapping orElse getValue orElse flatMap getValue build replyTarget replyTargetEnabled payloadMapping headerMapping acknowledgementRequests enforcement index consumerCount authorizationContext qos addresses
focal_method.modifiers: public static
focal_method.parameters: (final JsonObject jsonObject, final int index)
focal_method.return: Source
focal_method.signature: Source fromJson(final JsonObject jsonObject, final int index)