protected void serializeInternal()

in java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/AllocationExplainResponse.java [380:510]


	protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {

		if (this.allocateExplanation != null) {
			generator.writeKey("allocate_explanation");
			generator.write(this.allocateExplanation);

		}
		if (this.allocationDelay != null) {
			generator.writeKey("allocation_delay");
			this.allocationDelay.serialize(generator, mapper);

		}
		if (this.allocationDelayInMillis != null) {
			generator.writeKey("allocation_delay_in_millis");
			generator.write(this.allocationDelayInMillis);

		}
		if (this.canAllocate != null) {
			generator.writeKey("can_allocate");
			this.canAllocate.serialize(generator, mapper);
		}
		if (this.canMoveToOtherNode != null) {
			generator.writeKey("can_move_to_other_node");
			this.canMoveToOtherNode.serialize(generator, mapper);
		}
		if (this.canRebalanceCluster != null) {
			generator.writeKey("can_rebalance_cluster");
			this.canRebalanceCluster.serialize(generator, mapper);
		}
		if (ApiTypeHelper.isDefined(this.canRebalanceClusterDecisions)) {
			generator.writeKey("can_rebalance_cluster_decisions");
			generator.writeStartArray();
			for (AllocationDecision item0 : this.canRebalanceClusterDecisions) {
				item0.serialize(generator, mapper);

			}
			generator.writeEnd();

		}
		if (this.canRebalanceToOtherNode != null) {
			generator.writeKey("can_rebalance_to_other_node");
			this.canRebalanceToOtherNode.serialize(generator, mapper);
		}
		if (ApiTypeHelper.isDefined(this.canRemainDecisions)) {
			generator.writeKey("can_remain_decisions");
			generator.writeStartArray();
			for (AllocationDecision item0 : this.canRemainDecisions) {
				item0.serialize(generator, mapper);

			}
			generator.writeEnd();

		}
		if (this.canRemainOnCurrentNode != null) {
			generator.writeKey("can_remain_on_current_node");
			this.canRemainOnCurrentNode.serialize(generator, mapper);
		}
		if (this.clusterInfo != null) {
			generator.writeKey("cluster_info");
			this.clusterInfo.serialize(generator, mapper);

		}
		if (this.configuredDelay != null) {
			generator.writeKey("configured_delay");
			this.configuredDelay.serialize(generator, mapper);

		}
		if (this.configuredDelayInMillis != null) {
			generator.writeKey("configured_delay_in_millis");
			generator.write(this.configuredDelayInMillis);

		}
		if (this.currentNode != null) {
			generator.writeKey("current_node");
			this.currentNode.serialize(generator, mapper);

		}
		generator.writeKey("current_state");
		generator.write(this.currentState);

		generator.writeKey("index");
		generator.write(this.index);

		if (this.moveExplanation != null) {
			generator.writeKey("move_explanation");
			generator.write(this.moveExplanation);

		}
		if (ApiTypeHelper.isDefined(this.nodeAllocationDecisions)) {
			generator.writeKey("node_allocation_decisions");
			generator.writeStartArray();
			for (NodeAllocationExplanation item0 : this.nodeAllocationDecisions) {
				item0.serialize(generator, mapper);

			}
			generator.writeEnd();

		}
		generator.writeKey("primary");
		generator.write(this.primary);

		if (this.rebalanceExplanation != null) {
			generator.writeKey("rebalance_explanation");
			generator.write(this.rebalanceExplanation);

		}
		if (this.remainingDelay != null) {
			generator.writeKey("remaining_delay");
			this.remainingDelay.serialize(generator, mapper);

		}
		if (this.remainingDelayInMillis != null) {
			generator.writeKey("remaining_delay_in_millis");
			generator.write(this.remainingDelayInMillis);

		}
		generator.writeKey("shard");
		generator.write(this.shard);

		if (this.unassignedInfo != null) {
			generator.writeKey("unassigned_info");
			this.unassignedInfo.serialize(generator, mapper);

		}
		if (this.note != null) {
			generator.writeKey("note");
			generator.write(this.note);

		}

	}