{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-file-storage/json-schema/azure-file-storage-storage-service-properties-schema.json",
  "title": "StorageServiceProperties",
  "description": "Storage service properties.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-file-storage-openapi.yml#/components/schemas/StorageServiceProperties",
  "type": "object",
  "properties": {
    "HourMetrics": {
      "description": "A summary of request statistics grouped by API in hourly aggregates for files.",
      "$ref": "#/$defs/Metrics"
    },
    "MinuteMetrics": {
      "description": "A summary of request statistics grouped by API in minute aggregates for files.",
      "$ref": "#/$defs/Metrics"
    },
    "Cors": {
      "description": "The set of CORS rules.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CorsRule"
      }
    },
    "Protocol": {
      "description": "Protocol settings",
      "$ref": "#/$defs/ShareProtocolSettings"
    }
  },
  "$defs": {
    "CorsRule": {
      "description": "CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.",
      "type": "object",
      "required": [
        "AllowedOrigins",
        "AllowedMethods",
        "AllowedHeaders",
        "ExposedHeaders",
        "MaxAgeInSeconds"
      ],
      "properties": {
        "AllowedOrigins": {
          "description": "The origin domains that are permitted to make a request against the storage service via CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard character '*' to allow all origin domains to make requests via CORS.",
          "type": "string"
        },
        "AllowedMethods": {
          "description": "The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)",
          "type": "string"
        },
        "AllowedHeaders": {
          "description": "The request headers that the origin domain may specify on the CORS request.",
          "type": "string"
        },
        "ExposedHeaders": {
          "description": "The response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.",
          "type": "string"
        },
        "MaxAgeInSeconds": {
          "description": "The maximum amount time that a browser should cache the preflight OPTIONS request.",
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "Metrics": {
      "description": "Storage Analytics metrics for file service.",
      "required": [
        "Version",
        "Enabled"
      ],
      "properties": {
        "Version": {
          "description": "The version of Storage Analytics to configure.",
          "type": "string"
        },
        "Enabled": {
          "description": "Indicates whether metrics are enabled for the File service.",
          "type": "boolean"
        },
        "IncludeAPIs": {
          "description": "Indicates whether metrics should generate summary statistics for called API operations.",
          "type": "boolean"
        },
        "RetentionPolicy": {
          "$ref": "#/$defs/RetentionPolicy"
        }
      }
    },
    "RetentionPolicy": {
      "description": "The retention policy.",
      "type": "object",
      "required": [
        "Enabled"
      ],
      "properties": {
        "Enabled": {
          "description": "Indicates whether a retention policy is enabled for the File service. If false, metrics data is retained, and the user is responsible for deleting it.",
          "type": "boolean"
        },
        "Days": {
          "description": "Indicates the number of days that metrics data should be retained. All data older than this value will be deleted. Metrics data is deleted on a best-effort basis after the retention period expires.",
          "type": "integer",
          "minimum": 1,
          "maximum": 365
        }
      }
    },
    "ShareNfsSettings": {
      "description": "Settings for SMB protocol.",
      "type": "object",
      "properties": {
        "EncryptionInTransit": {
          "description": "Enable or disable encryption in transit.",
          "type": "object",
          "properties": {
            "Required": {
              "description": "If encryption in transit is required",
              "type": "boolean"
            }
          }
        }
      }
    },
    "ShareProtocolSettings": {
      "description": "Protocol settings",
      "type": "object",
      "properties": {
        "Smb": {
          "description": "Settings for SMB protocol.",
          "$ref": "#/$defs/ShareSmbSettings"
        },
        "Nfs": {
          "description": "Settings for NFS protocol.",
          "$ref": "#/$defs/ShareNfsSettings"
        }
      }
    },
    "ShareSmbSettings": {
      "description": "Settings for SMB protocol.",
      "type": "object",
      "properties": {
        "Multichannel": {
          "description": "Settings for SMB Multichannel.",
          "$ref": "#/$defs/SmbMultichannel"
        },
        "EncryptionInTransit": {
          "description": "Enable or disable encryption in transit.",
          "type": "object",
          "properties": {
            "Required": {
              "description": "If encryption in transit is required",
              "type": "boolean"
            }
          }
        }
      }
    },
    "SmbMultichannel": {
      "description": "Settings for SMB multichannel",
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "If SMB multichannel is enabled."
        }
      }
    }
  }
}