{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-event-grid/json-schema/azure-event-grid-channel-schema.json",
  "title": "Channel",
  "description": "Channel info.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-event-grid-channels-api-openapi.yml#/components/schemas/Channel",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/ChannelProperties",
      "description": "Properties of the Channel.",
      "x-ms-client-flatten": true
    },
    "systemData": {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/systemData",
      "description": "The system metadata relating to the Event Grid resource.",
      "type": "object",
      "readOnly": true
    }
  },
  "$defs": {
    "ChannelProperties": {
      "description": "Properties of the Channel.",
      "type": "object",
      "properties": {
        "channelType": {
          "description": "The type of the event channel which represents the direction flow of events.",
          "enum": [
            "PartnerTopic"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ChannelType",
            "modelAsString": true
          }
        },
        "partnerTopicInfo": {
          "$ref": "#/$defs/PartnerTopicInfo",
          "description": "This property should be populated when channelType is PartnerTopic and represents information about the partner topic resource corresponding to the channel."
        },
        "messageForActivation": {
          "description": "Context or helpful message that can be used during the approval process by the subscriber.",
          "type": "string"
        },
        "provisioningState": {
          "description": "Provisioning state of the channel.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Canceled",
            "Failed",
            "IdleDueToMirroredPartnerTopicDeletion"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ChannelProvisioningState",
            "modelAsString": true
          }
        },
        "readinessState": {
          "description": "The readiness state of the corresponding partner topic.",
          "enum": [
            "NeverActivated",
            "Activated"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "ReadinessState",
            "modelAsString": true
          }
        },
        "expirationTimeIfNotActivatedUtc": {
          "format": "date-time",
          "description": "Expiration time of the channel. If this timer expires while the corresponding partner topic is never activated,\nthe channel and corresponding partner topic are deleted.",
          "type": "string"
        }
      }
    },
    "EventTypeInfo": {
      "description": "The event type information for Channels.",
      "type": "object",
      "properties": {
        "kind": {
          "description": "The kind of event type used.",
          "enum": [
            "Inline"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "EventDefinitionKind",
            "modelAsString": true
          }
        },
        "inlineEventTypes": {
          "description": "A collection of inline event types for the resource. The inline event type keys are of type string which represents the name of the event.\nAn example of a valid inline event name is \"Contoso.OrderCreated\".\nThe inline event type values are of type InlineEventProperties and will contain additional information for every inline event type.",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/InlineEventProperties"
          }
        }
      }
    },
    "InlineEventProperties": {
      "description": "Additional information about every inline event.",
      "type": "object",
      "properties": {
        "description": {
          "description": "The description for the inline event.",
          "type": "string"
        },
        "displayName": {
          "description": "The displayName for the inline event.",
          "type": "string"
        },
        "documentationUrl": {
          "description": "The documentationUrl for the inline event.",
          "type": "string"
        },
        "dataSchemaUrl": {
          "description": "The dataSchemaUrl for the inline event.",
          "type": "string"
        }
      }
    },
    "PartnerTopicInfo": {
      "description": "Properties of the corresponding partner topic of a Channel.",
      "type": "object",
      "properties": {
        "azureSubscriptionId": {
          "description": "Azure subscription ID of the subscriber. The partner topic associated with the channel will be\ncreated under this Azure subscription.",
          "type": "string"
        },
        "resourceGroupName": {
          "description": "Azure Resource Group of the subscriber. The partner topic associated with the channel will be\ncreated under this resource group.",
          "type": "string"
        },
        "name": {
          "description": "Name of the partner topic associated with the channel.",
          "type": "string"
        },
        "eventTypeInfo": {
          "$ref": "#/$defs/EventTypeInfo",
          "description": "Event Type Information for the partner topic. This information is provided by the publisher and can be used by the \nsubscriber to view different types of events that are published."
        },
        "source": {
          "description": "The source information is provided by the publisher to determine the scope or context from which the events\nare originating. This information can be used by the subscriber during the approval process of the\ncreated partner topic.",
          "type": "string"
        }
      }
    },
    "Resource": {
      "description": "Definition of a Resource.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Fully qualified identifier of the resource.",
          "type": "string",
          "readOnly": true
        },
        "name": {
          "description": "Name of the resource.",
          "type": "string",
          "readOnly": true
        },
        "type": {
          "description": "Type of the resource.",
          "type": "string",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    }
  }
}