{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-address-resource-schema.json",
  "title": "AddressResource",
  "description": "Address Resource.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-addresses-api-openapi.yml#/components/schemas/AddressResource",
  "required": [
    "properties"
  ],
  "type": "object",
  "allOf": [
    {
      "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/AddressProperties",
      "description": "Properties of an address.",
      "x-ms-client-flatten": true
    },
    "systemData": {
      "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
      "description": "Represents resource creation and update time.",
      "readOnly": true
    }
  },
  "$defs": {
    "AddressProperties": {
      "description": "Address Properties.",
      "required": [
        "contactDetails"
      ],
      "type": "object",
      "properties": {
        "shippingAddress": {
          "$ref": "#/$defs/ShippingAddress",
          "description": "Shipping details for the address."
        },
        "contactDetails": {
          "$ref": "#/$defs/ContactDetails",
          "description": "Contact details for the address."
        },
        "addressValidationStatus": {
          "description": "Status of address validation.",
          "enum": [
            "Valid",
            "Invalid",
            "Ambiguous"
          ],
          "type": "string",
          "readOnly": true,
          "x-ms-enum": {
            "name": "AddressValidationStatus",
            "modelAsString": true,
            "values": [
              {
                "value": "Valid",
                "description": "Address provided is valid."
              },
              {
                "value": "Invalid",
                "description": "Address provided is invalid or not supported."
              },
              {
                "value": "Ambiguous",
                "description": "Address provided is ambiguous, please choose one of the alternate addresses returned."
              }
            ]
          }
        }
      }
    },
    "ContactDetails": {
      "description": "Contact Details.",
      "required": [
        "contactName",
        "phone",
        "emailList"
      ],
      "type": "object",
      "properties": {
        "contactName": {
          "description": "Contact name of the person.",
          "type": "string"
        },
        "phone": {
          "description": "Phone number of the contact person.",
          "type": "string"
        },
        "phoneExtension": {
          "description": "Phone extension number of the contact person.",
          "type": "string"
        },
        "mobile": {
          "description": "Mobile number of the contact person.",
          "type": "string"
        },
        "emailList": {
          "description": "List of Email-ids to be notified about job progress.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ShippingAddress": {
      "description": "Shipping address where customer wishes to receive the device.",
      "required": [
        "streetAddress1",
        "country"
      ],
      "type": "object",
      "properties": {
        "streetAddress1": {
          "description": "Street Address line 1.",
          "type": "string"
        },
        "streetAddress2": {
          "description": "Street Address line 2.",
          "type": "string"
        },
        "streetAddress3": {
          "description": "Street Address line 3.",
          "type": "string"
        },
        "city": {
          "description": "Name of the City.",
          "type": "string"
        },
        "stateOrProvince": {
          "description": "Name of the State or Province.",
          "type": "string"
        },
        "country": {
          "description": "Name of the Country.",
          "type": "string"
        },
        "postalCode": {
          "description": "Postal code.",
          "type": "string"
        },
        "zipExtendedCode": {
          "description": "Extended Zip Code.",
          "type": "string"
        },
        "companyName": {
          "description": "Name of the company.",
          "type": "string"
        },
        "addressType": {
          "description": "Type of address.",
          "enum": [
            "None",
            "Residential",
            "Commercial"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "AddressType",
            "modelAsString": true,
            "values": [
              {
                "value": "None",
                "description": "Address type not known."
              },
              {
                "value": "Residential",
                "description": "Residential Address."
              },
              {
                "value": "Commercial",
                "description": "Commercial Address."
              }
            ]
          }
        }
      }
    }
  }
}