{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/telenor-sverige/main/json-schema/telenor-sverige-core-api-product-catalog-pc-views-service-rules-view-schema.json",
  "title": "CoreApi.ProductCatalog.PC.Views.ServiceRulesView",
  "x-generated": "2026-10-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mobile-order.yml#/components/schemas/CoreApi.ProductCatalog.PC.Views.ServiceRulesView",
  "type": "object",
  "properties": {
    "RequiresAny": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CoreApi.ProductCatalog.PC.Views.ServiceRequiresAnyView"
      }
    },
    "RequiresAll": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CoreApi.ProductCatalog.PC.Views.ServiceRequiresAllView"
      }
    },
    "Incompatible": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CoreApi.ProductCatalog.PC.Views.IncompatibleServiceView"
      }
    },
    "KeepList": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/corporate_product_catalog.KeepList.KeepListViewItem"
      }
    },
    "SubscriptionServiceRequiresAgreementService": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/corporate_agreement_ef.Model.AgreeToSubServiceRelation"
      }
    },
    "SubscriptionServiceNotAllowedForAgreementService": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/corporate_agreement_ef.Model.AgreeToSubServiceRelation"
      }
    },
    "RemoveOnTransfer": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CoreApi.ProductCatalog.RemoveOnTransferView"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CoreApi.ProductCatalog.PC.Views.IncompatibleServiceView": {
      "type": "object",
      "properties": {
        "ServiceId": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "Services": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "CoreApi.ProductCatalog.PC.Views.ServiceRequiresAllView": {
      "type": "object",
      "properties": {
        "ServiceId": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "ValidForOfferId": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "Services": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "CoreApi.ProductCatalog.PC.Views.ServiceRequiresAnyView": {
      "type": "object",
      "properties": {
        "ServiceId": {
          "type": [
            "string",
            "null"
          ]
        },
        "ValidForOfferId": {
          "type": [
            "string",
            "null"
          ]
        },
        "Services": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "CoreApi.ProductCatalog.RemoveOnTransferView": {
      "type": "object",
      "properties": {
        "ServiceId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "corporate_agreement_ef.Model.AgreeToSubServiceRelation": {
      "type": "object",
      "properties": {
        "SubscriberServiceID": {
          "type": [
            "string",
            "null"
          ]
        },
        "SubscriberServiceName": {
          "type": [
            "string",
            "null"
          ]
        },
        "AgreementServiceID": {
          "type": [
            "string",
            "null"
          ]
        },
        "AgreementServiceName": {
          "type": [
            "string",
            "null"
          ]
        },
        "ValidForOfferID": {
          "type": [
            "string",
            "null"
          ]
        },
        "OfferName": {
          "type": [
            "string",
            "null"
          ]
        },
        "ParameterRelations": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/corporate_agreement_ef.Model.ParameterRelation"
          }
        }
      },
      "additionalProperties": false
    },
    "corporate_agreement_ef.Model.ParameterRelation": {
      "type": "object",
      "properties": {
        "AgreementParamterID": {
          "type": [
            "string",
            "null"
          ]
        },
        "BassParameterID": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "corporate_product_catalog.KeepList.KeepListViewItem": {
      "required": [
        "KeepLevel",
        "ServiceId"
      ],
      "type": "object",
      "properties": {
        "ServiceId": {
          "type": [
            "string",
            "null"
          ]
        },
        "ExcludedSubscriptionForm": {
          "enum": [
            "NX",
            "IV",
            "NV",
            "2J",
            "EB",
            "2I",
            "CX",
            "NY",
            "NW"
          ],
          "type": [
            "string",
            "null"
          ],
          "description": "Members [NX=|IV=|NV=|2J=|EB=|2I=|CX=|NY=|NW=]"
        },
        "ExcludedSubscriptionType": {
          "enum": [
            "G",
            "V",
            "A",
            "K",
            "Q",
            "R",
            "O",
            "S",
            "P",
            "M",
            "Y",
            "N",
            "C",
            "J",
            "L",
            "F",
            "E",
            "D",
            "T",
            "I"
          ],
          "type": [
            "string",
            "null"
          ],
          "description": "Members [G=|V=|A=|K=|Q=|R=|O=|S=|P=|M=|Y=|N=|C=|J=|L=|F=|E=|D=|T=|I=]"
        },
        "KeepLevel": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  }
}