{
  "description": "Defines the json object expected by `amplify update geo --headless`",
  "type": "object",
  "properties": {
    "version": {
      "description": "The schema version.",
      "type": "number",
      "enum": [1]
    },
    "serviceModification": {
      "description": "The service modification that will be interpreted by Amplify.",
      "allOf": [
        {
          "$ref": "#/definitions/BaseGeoServiceModification"
        },
        {
          "$ref": "#/definitions/MapModification"
        }
      ]
    }
  },
  "required": ["serviceModification", "version"],
  "definitions": {
    "BaseGeoServiceModification": {
      "description": "Modification that applies to all geo service configuration.",
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "The service name of the resource provider.",
          "type": "string"
        },
        "name": {
          "description": "The name of the map that will be updated.",
          "type": "string"
        },
        "setAsDefault": {
          "description": "Whether the geo resource added is set to default.",
          "type": "boolean"
        },
        "accessType": {
          "$ref": "#/definitions/AccessType",
          "description": "The access policy for geo resources."
        }
      },
      "required": ["accessType", "name", "serviceName", "setAsDefault"]
    },
    "AccessType": {
      "description": "Definition of access type",
      "enum": ["AuthorizedAndGuestUsers", "AuthorizedUsers"],
      "type": "string"
    },
    "MapModification": {
      "description": "Specifies modification for map.",
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "The service name of the resource provider.",
          "type": "string",
          "enum": ["Map"]
        }
      },
      "required": ["serviceName"]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
