{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Email",
  "/properties/Phone",
  "/properties/ProfileId"
 ],
 "definitions": {
  "CapabilityOptions": {
   "additionalProperties": false,
   "properties": {
    "InboundEdi": {
     "$ref": "#/definitions/InboundEdiOptions"
    },
    "OutboundEdi": {
     "$ref": "#/definitions/OutboundEdiOptions"
    }
   },
   "type": "object"
  },
  "InboundEdiOptions": {
   "additionalProperties": false,
   "properties": {
    "X12": {
     "$ref": "#/definitions/X12InboundEdiOptions"
    }
   },
   "type": "object"
  },
  "LineTerminator": {
   "enum": [
    "CRLF",
    "LF",
    "CR"
   ],
   "type": "string"
  },
  "OutboundEdiOptions": {
   "oneOf": [
    {
     "additionalProperties": false,
     "properties": {
      "X12": {
       "$ref": "#/definitions/X12Envelope"
      }
     },
     "required": [
      "X12"
     ],
     "title": "X12",
     "type": "object"
    }
   ]
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Key",
    "Value"
   ],
   "type": "object"
  },
  "WrapFormat": {
   "enum": [
    "SEGMENT",
    "ONE_LINE",
    "LINE_LENGTH"
   ],
   "type": "string"
  },
  "WrapOptions": {
   "additionalProperties": false,
   "properties": {
    "LineLength": {
     "minimum": 1,
     "type": "number"
    },
    "LineTerminator": {
     "$ref": "#/definitions/LineTerminator"
    },
    "WrapBy": {
     "$ref": "#/definitions/WrapFormat"
    }
   },
   "type": "object"
  },
  "X12AcknowledgmentOptions": {
   "additionalProperties": false,
   "properties": {
    "FunctionalAcknowledgment": {
     "$ref": "#/definitions/X12FunctionalAcknowledgment"
    },
    "TechnicalAcknowledgment": {
     "$ref": "#/definitions/X12TechnicalAcknowledgment"
    }
   },
   "required": [
    "FunctionalAcknowledgment",
    "TechnicalAcknowledgment"
   ],
   "type": "object"
  },
  "X12ControlNumbers": {
   "additionalProperties": false,
   "properties": {
    "StartingFunctionalGroupControlNumber": {
     "maximum": 999999999,
     "minimum": 1,
     "type": "number"
    },
    "StartingInterchangeControlNumber": {
     "maximum": 999999999,
     "minimum": 1,
     "type": "number"
    },
    "StartingTransactionSetControlNumber": {
     "maximum": 999999999,
     "minimum": 1,
     "type": "number"
    }
   },
   "type": "object"
  },
  "X12Delimiters": {
   "additionalProperties": false,
   "properties": {
    "ComponentSeparator": {
     "maxLength": 1,
     "minLength": 1,
     "pattern": "^[!&'()*+,\\-./:;?=%@\\[\\]_{}|<>~^`\"]$",
     "type": "string"
    },
    "DataElementSeparator": {
     "maxLength": 1,
     "minLength": 1,
     "pattern": "^[!&'()*+,\\-./:;?=%@\\[\\]_{}|<>~^`\"]$",
     "type": "string"
    },
    "SegmentTerminator": {
     "maxLength": 1,
     "minLength": 1,
     "pattern": "^[!&'()*+,\\-./:;?=%@\\[\\]_{}|<>~^`\"]$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "X12Envelope": {
   "additionalProperties": false,
   "properties": {
    "Common": {
     "$ref": "#/definitions/X12OutboundEdiHeaders"
    },
    "WrapOptions": {
     "$ref": "#/definitions/WrapOptions"
    }
   },
   "type": "object"
  },
  "X12FunctionalAcknowledgment": {
   "enum": [
    "DO_NOT_GENERATE",
    "GENERATE_ALL_SEGMENTS",
    "GENERATE_WITHOUT_TRANSACTION_SET_RESPONSE_LOOP"
   ],
   "type": "string"
  },
  "X12FunctionalGroupHeaders": {
   "additionalProperties": false,
   "properties": {
    "ApplicationReceiverCode": {
     "maxLength": 15,
     "minLength": 2,
     "pattern": "^[a-zA-Z0-9 ]*$",
     "type": "string"
    },
    "ApplicationSenderCode": {
     "maxLength": 15,
     "minLength": 2,
     "pattern": "^[a-zA-Z0-9 ]*$",
     "type": "string"
    },
    "ResponsibleAgencyCode": {
     "maxLength": 2,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9]*$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "X12GS05TimeFormat": {
   "enum": [
    "HHMM",
    "HHMMSS",
    "HHMMSSDD"
   ],
   "type": "string"
  },
  "X12InboundEdiOptions": {
   "additionalProperties": false,
   "properties": {
    "AcknowledgmentOptions": {
     "$ref": "#/definitions/X12AcknowledgmentOptions"
    }
   },
   "type": "object"
  },
  "X12InterchangeControlHeaders": {
   "additionalProperties": false,
   "properties": {
    "AcknowledgmentRequestedCode": {
     "maxLength": 1,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9]*$",
     "type": "string"
    },
    "ReceiverId": {
     "maxLength": 15,
     "minLength": 15,
     "pattern": "^[a-zA-Z0-9 ]*$",
     "type": "string"
    },
    "ReceiverIdQualifier": {
     "maxLength": 2,
     "minLength": 2,
     "pattern": "^[a-zA-Z0-9]*$",
     "type": "string"
    },
    "RepetitionSeparator": {
     "maxLength": 1,
     "minLength": 1,
     "type": "string"
    },
    "SenderId": {
     "maxLength": 15,
     "minLength": 15,
     "pattern": "^[a-zA-Z0-9 ]*$",
     "type": "string"
    },
    "SenderIdQualifier": {
     "maxLength": 2,
     "minLength": 2,
     "pattern": "^[a-zA-Z0-9]*$",
     "type": "string"
    },
    "UsageIndicatorCode": {
     "maxLength": 1,
     "minLength": 1,
     "pattern": "^[a-zA-Z0-9]*$",
     "type": "string"
    }
   },
   "type": "object"
  },
  "X12OutboundEdiHeaders": {
   "additionalProperties": false,
   "properties": {
    "ControlNumbers": {
     "$ref": "#/definitions/X12ControlNumbers"
    },
    "Delimiters": {
     "$ref": "#/definitions/X12Delimiters"
    },
    "FunctionalGroupHeaders": {
     "$ref": "#/definitions/X12FunctionalGroupHeaders"
    },
    "Gs05TimeFormat": {
     "$ref": "#/definitions/X12GS05TimeFormat"
    },
    "InterchangeControlHeaders": {
     "$ref": "#/definitions/X12InterchangeControlHeaders"
    },
    "ValidateEdi": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "X12TechnicalAcknowledgment": {
   "enum": [
    "DO_NOT_GENERATE",
    "GENERATE_ALL_SEGMENTS"
   ],
   "type": "string"
  }
 },
 "primaryIdentifier": [
  "/properties/PartnershipId"
 ],
 "properties": {
  "Capabilities": {
   "items": {
    "maxLength": 64,
    "minLength": 1,
    "pattern": "^[a-zA-Z0-9_-]+$",
    "type": "string"
   },
   "type": "array"
  },
  "CapabilityOptions": {
   "$ref": "#/definitions/CapabilityOptions"
  },
  "CreatedAt": {
   "format": "date-time",
   "type": "string"
  },
  "Email": {
   "maxLength": 254,
   "minLength": 5,
   "pattern": "^[\\w\\.\\-]+@[\\w\\.\\-]+$",
   "type": "string"
  },
  "ModifiedAt": {
   "format": "date-time",
   "type": "string"
  },
  "Name": {
   "maxLength": 254,
   "minLength": 1,
   "type": "string"
  },
  "PartnershipArn": {
   "maxLength": 255,
   "minLength": 1,
   "type": "string"
  },
  "PartnershipId": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9_-]+$",
   "type": "string"
  },
  "Phone": {
   "maxLength": 22,
   "minLength": 7,
   "pattern": "^\\+?([0-9 \\t\\-()\\/]{7,})(?:\\s*(?:#|x\\.?|ext\\.?|extension) \\t*(\\d+))?$",
   "type": "string"
  },
  "ProfileId": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9_-]+$",
   "type": "string"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "maxItems": 200,
   "minItems": 0,
   "type": "array"
  },
  "TradingPartnerId": {
   "maxLength": 64,
   "minLength": 1,
   "pattern": "^[a-zA-Z0-9_-]+$",
   "type": "string"
  }
 },
 "readOnlyProperties": [
  "/properties/CreatedAt",
  "/properties/ModifiedAt",
  "/properties/PartnershipArn",
  "/properties/PartnershipId",
  "/properties/TradingPartnerId"
 ],
 "required": [
  "Capabilities",
  "Email",
  "Name",
  "ProfileId"
 ],
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::B2BI::Partnership"
}
