{
	"$id": "https://drillplan.slb.com/effective-mud-design.json",
	"$schema": "http://json-schema.org/draft-07/schema#",
	"title": "DrillPlan effective mud design",
	"description": "DrillPlan effective mud design. AEA input type name: effective_mud-design-v1",
	"type": "object",
	"properties": {
		"effective_mud_design_results": {
			"type": "array",
			"description": "Drilling fluid properties at each depth.",
			"items": {
				"$ref": "#/definitions/effective-mud-design-result"
			}
		},
		"drilling_fluid_program_id": {
			"description": "Id of the drilling fluid program.",
			"type": "string"
		},
		"section_id": {
			"description": "Id of the section.",
			"type": "string"
		},
		"user_ldap_alias": {
			"description": "User LDAP alias.",
			"type": "string"
		}
	},
	"definitions": {
		"effective-mud-design-result": {
			"$id": "https://drillplan.slb.com/effective-mud-design.json#effective-mud-design-result",
			"$schema": "http://json-schema.org/draft-07/schema#",
			"title": "Drilling fluid properties at specific hole depth",
			"type": "object",
			"properties": {
				"base_fluid_type": {
					"type": "string",
					"title": "Continuous phase of the drilling fluid, identified by names conforming to Schlumberger's hydraulics calculation engine's contract. The names may not correlate exactly to the base fluid specified in the Drilling Fluid Program."
				},
				"base_fluid": {
					"type": "string",
					"title": "Continuous phase of the drilling fluid, identified by codes that correlate exactly to the base fluid specified in the Drilling Fluid Program."
				},
				"fluid_system": {
					"type": "string",
					"title": "Fluid system."
				},
				"fluid_system_name": {
					"type": "string",
					"title": "Fluid system name."
				},
				"fluid_type_name": {
					"type": "string",
					"enum": [
						"OilBased",
						"WaterBased",
						"Synthetic",
						"Unknown"
					],
					"description": "Type of the drilling fluid."
				},
				"start_depth": {
					"type": "number",
					"description": "Start depth (StandardDepthIndex,meter,m)."
				},
				"density": {
					"$ref": "#/definitions/mud-density-range-with-recommendation",
					"description": "Max, min, recommendation drilling fluid properties."
				},
				"recipe": {
					"$ref": "#/definitions/recipe-v6",
					"description": "Recipe of products in the fluid."
				}
			}
		},
		"mud-density-range-with-recommendation": {
			"$id": "https://drillplan.slb.com/effective-drilling-fluid.json#density-range-with-recommendation",
			"$schema": "http://json-schema.org/draft-07/schema#",
			"title": "Density Properties",
			"type": "object",
			"properties": {
				"min": {
					"type": "number",
					"description": "Min."
				},
				"max": {
					"type": "number",
					"descriptipon": "Max."
				},
				"recommendation": {
					"type": "number",
					"description": "Recommendation."
				}
			}
		},
		"recipe-v6": {
			"$id": "https://drillplan.slb.com/effective-mud-design.json#recipe-v6",
			"$schema": "http://json-schema.org/draft-07/schema#",
			"title": "Recipe of products in the fluid.",
			"type": "object",
			"properties": {
				"products": {
					"type": "array",
					"description": "Product in the recipe.",
					"items": {
						"$ref": "#/definitions/products-v6"
					}
				},
				"volume_to_use": {
					"type": "string",
					"enum": [
						"DilutionVolumeToMeetDrilledSolidsPctTarget",
						"DownholeVolume",
						"OpenHoleVolume",
						"ActiveSurfaceSystemVolume",
						"TotalWholeFluidVolume"
					],
					"description": "Type of the volume to use."
				}
			}
		},
		"products-v6": {
			"$id": "https://drillplan.slb.com/effective-drilling-fluid.json#products-v6",
			"$schema": "http://json-schema.org/draft-07/schema#",
			"title": "Products",
			"type": "object",
			"properties": {
				"product_catalog_metadata": {
					"$ref": "#/definitions/product-catalog-metadata"
				},
				"product_name": {
					"type": "string",
					"description": "Product name."
				},
				"technology": {
					"type": "string",
					"description": "Technology."
				},
				"brand": {
					"type": "string",
					"description": "Brand name."
				},
				"shl71": {
					"type": "string",
					"description": "Sh171."
				},
				"state": {
					"type": "string",
					"enum": [
						"Solid",
						"Liquid"
					],
					"description": "State."
				},
				"usage_factor": {
					"type": "number",
					"description": "Usage factor."
				},
				"product_sg": {
					"type": "number",
					"description": "Product sg."
				},
				"is_default_sg": {
					"type": "boolean",
					"description": "Flag."
				},
				"concentration": {
					"type": "number",
					"description": "Concentration."
				},
				"volume": {
					"type": "number",
					"description": "Volume."
				},
				"mass": {
					"type": "number",
					"description": "Mass."
				},
				"environment_classification": {
					"type": "integer",
					"description": "Environment classification."
				},
				"environment": {
					"type": "string",
					"enum": [
						"Green",
						"Red",
						"Yellow"
					],
					"description": "Environment color."
				}
			}
		},
		"product-catalog-metadata": {
			"$id": "https://drillplan.slb.com/effective-drilling-fluid.json#product-catalog-metadata",
			"$schema": "http://json-schema.org/draft-07/schema#",
			"title": "Products",
			"type": "object",
			"properties": {
				"id": {
					"type": "string",
					"description": "Id of product."
				},
				"is_slb": {
					"type": "boolean",
					"description": "Flag."
				},
				"create_time": {
					"type": "string",
					"description": "Create time."
				},
				"update_time": {
					"type": "string",
					"description": "Update time."
				},
				"created_by": {
					"type": "string",
					"description": "Created by user name."
				},
				"updated_by": {
					"type": "string",
					"description": "Updated user name."
				}
			}
		}
	}
}