{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-integration-services/json-schema/microsoft-azure-integration-services-sbsubscription-schema.json",
  "title": "SBSubscription",
  "description": "Description of subscription resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-integration-services-subscriptions-api-openapi.yml#/components/schemas/SBSubscription",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/SBSubscriptionProperties",
      "description": "Properties of subscriptions resource.",
      "x-ms-client-flatten": true
    },
    "location": {
      "type": "string",
      "description": "The geo-location where the resource lives",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "EntityStatus": {
      "type": "string",
      "description": "Entity status.",
      "enum": [
        "Active",
        "Disabled",
        "Restoring",
        "SendDisabled",
        "ReceiveDisabled",
        "Creating",
        "Deleting",
        "Renaming",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "EntityStatus",
        "modelAsString": false
      }
    },
    "MessageCountDetails": {
      "type": "object",
      "description": "Message Count Details.",
      "properties": {
        "activeMessageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of active messages in the queue, topic, or subscription.",
          "readOnly": true
        },
        "deadLetterMessageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of messages that are dead lettered.",
          "readOnly": true
        },
        "scheduledMessageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of scheduled messages.",
          "readOnly": true
        },
        "transferMessageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of messages transferred to another queue, topic, or subscription.",
          "readOnly": true
        },
        "transferDeadLetterMessageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of messages transferred into dead letters.",
          "readOnly": true
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "SBClientAffineProperties": {
      "type": "object",
      "description": "Properties specific to client affine subscriptions.",
      "properties": {
        "clientId": {
          "type": "string",
          "description": "Indicates the Client ID of the application that created the client-affine subscription."
        },
        "isDurable": {
          "type": "boolean",
          "description": "For client-affine subscriptions, this value indicates whether the subscription is durable or not."
        },
        "isShared": {
          "type": "boolean",
          "description": "For client-affine subscriptions, this value indicates whether the subscription is shared or not."
        }
      }
    },
    "SBSubscriptionProperties": {
      "type": "object",
      "description": "Description of Subscription Resource.",
      "properties": {
        "messageCount": {
          "type": "integer",
          "format": "int64",
          "description": "Number of messages.",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "Exact time the message was created.",
          "readOnly": true
        },
        "accessedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Last time there was a receive request to this subscription.",
          "readOnly": true
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The exact time the message was updated.",
          "readOnly": true
        },
        "countDetails": {
          "$ref": "#/$defs/MessageCountDetails",
          "description": "Message count details",
          "readOnly": true
        },
        "lockDuration": {
          "type": "string",
          "format": "duration",
          "description": "ISO 8061 lock duration timespan for the subscription. The default value is 1 minute."
        },
        "requiresSession": {
          "type": "boolean",
          "description": "Value indicating if a subscription supports the concept of sessions."
        },
        "defaultMessageTimeToLive": {
          "type": "string",
          "format": "duration",
          "description": "ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself."
        },
        "deadLetteringOnFilterEvaluationExceptions": {
          "type": "boolean",
          "description": "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions."
        },
        "deadLetteringOnMessageExpiration": {
          "type": "boolean",
          "description": "Value that indicates whether a subscription has dead letter support when a message expires."
        },
        "duplicateDetectionHistoryTimeWindow": {
          "type": "string",
          "format": "duration",
          "description": "ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes."
        },
        "maxDeliveryCount": {
          "type": "integer",
          "format": "int32",
          "description": "Number of maximum deliveries."
        },
        "status": {
          "$ref": "#/$defs/EntityStatus",
          "description": "Enumerates the possible values for the status of a messaging entity."
        },
        "enableBatchedOperations": {
          "type": "boolean",
          "description": "Value that indicates whether server-side batched operations are enabled."
        },
        "autoDeleteOnIdle": {
          "type": "string",
          "format": "duration",
          "description": "ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes."
        },
        "forwardTo": {
          "type": "string",
          "description": "Queue/Topic name to forward the messages"
        },
        "forwardDeadLetteredMessagesTo": {
          "type": "string",
          "description": "Queue/Topic name to forward the Dead Letter message"
        },
        "isClientAffine": {
          "type": "boolean",
          "description": "Value that indicates whether the subscription has an affinity to the client id."
        },
        "userMetadata": {
          "type": "string",
          "description": "Gets and Sets Metadata of User."
        },
        "clientAffineProperties": {
          "$ref": "#/$defs/SBClientAffineProperties",
          "description": "Properties specific to client affine subscriptions."
        }
      }
    }
  }
}