{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2020-08-21",
    "endpointPrefix":"contact-lens",
    "jsonVersion":"1.1",
    "protocol":"rest-json",
    "protocols":["rest-json"],
    "serviceAbbreviation":"Amazon Connect Contact Lens",
    "serviceFullName":"Amazon Connect Contact Lens",
    "serviceId":"Connect Contact Lens",
    "signatureVersion":"v4",
    "signingName":"connect",
    "uid":"connect-contact-lens-2020-08-21",
    "auth":["aws.auth#sigv4"]
  },
  "operations":{
    "ListRealtimeContactAnalysisSegments":{
      "name":"ListRealtimeContactAnalysisSegments",
      "http":{
        "method":"POST",
        "requestUri":"/realtime-contact-analysis/analysis-segments"
      },
      "input":{"shape":"ListRealtimeContactAnalysisSegmentsRequest"},
      "output":{"shape":"ListRealtimeContactAnalysisSegmentsResponse"},
      "errors":[
        {"shape":"InvalidRequestException"},
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"InternalServiceException"},
        {"shape":"ThrottlingException"}
      ]
    }
  },
  "shapes":{
    "AccessDeniedException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"Message"}
      },
      "error":{"httpStatusCode":403},
      "exception":true
    },
    "Categories":{
      "type":"structure",
      "required":[
        "MatchedCategories",
        "MatchedDetails"
      ],
      "members":{
        "MatchedCategories":{"shape":"MatchedCategories"},
        "MatchedDetails":{"shape":"MatchedDetails"}
      }
    },
    "CategoriesAttributeAndCondition":{
      "type":"structure",
      "members":{
        "TagConditions":{"shape":"TagAndConditionList"}
      }
    },
    "CategoriesAttributeFilter":{
      "type":"structure",
      "members":{
        "OrConditions":{"shape":"CategoriesAttributeOrConditionList"},
        "AndCondition":{"shape":"CategoriesAttributeAndCondition"},
        "TagCondition":{"shape":"TagCondition"}
      }
    },
    "CategoriesAttributeOrConditionList":{
      "type":"list",
      "member":{"shape":"CategoriesAttributeAndCondition"},
      "max":25
    },
    "CategoryDetails":{
      "type":"structure",
      "required":["PointsOfInterest"],
      "members":{
        "PointsOfInterest":{"shape":"PointsOfInterest"},
        "RuleId":{"shape":"RuleId"}
      }
    },
    "CategoryName":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "CharacterOffset":{
      "type":"integer",
      "min":0
    },
    "CharacterOffsets":{
      "type":"structure",
      "required":[
        "BeginOffsetChar",
        "EndOffsetChar"
      ],
      "members":{
        "BeginOffsetChar":{"shape":"CharacterOffset"},
        "EndOffsetChar":{"shape":"CharacterOffset"}
      }
    },
    "ContactId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "ExtractedInformation":{
      "type":"structure",
      "required":[
        "ExtractionDefinitionId",
        "ExtractionDefinitionName"
      ],
      "members":{
        "ExtractionDefinitionId":{"shape":"ExtractionDefinitionId"},
        "ExtractionDefinitionName":{"shape":"ExtractionDefinitionName"},
        "ExtractionDefinitionDisplayLabel":{"shape":"ExtractionDefinitionDisplayLabel"},
        "ExtractedValues":{"shape":"ExtractedInformationValues"},
        "FailureCode":{"shape":"ExtractedInformationFailureCode"}
      }
    },
    "ExtractedInformationContent":{
      "type":"string",
      "max":1024,
      "min":1
    },
    "ExtractedInformationFailureCode":{
      "type":"string",
      "enum":[
        "QUOTA_EXCEEDED",
        "INSUFFICIENT_CONVERSATION_CONTENT",
        "FAILED_SAFETY_GUIDELINES",
        "INTERNAL_ERROR",
        "MAX_PACKAGE_FEATURE_ONLY"
      ]
    },
    "ExtractedInformationValue":{
      "type":"structure",
      "required":[
        "Content",
        "PointsOfInterest"
      ],
      "members":{
        "Content":{"shape":"ExtractedInformationContent"},
        "PointsOfInterest":{"shape":"PointsOfInterest"}
      }
    },
    "ExtractedInformationValues":{
      "type":"list",
      "member":{"shape":"ExtractedInformationValue"}
    },
    "ExtractionDefinitionDisplayLabel":{
      "type":"string",
      "max":25,
      "min":0
    },
    "ExtractionDefinitionId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "ExtractionDefinitionName":{
      "type":"string",
      "max":200,
      "min":1,
      "pattern":".*\\S.*"
    },
    "InstanceId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "InternalServiceException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"Message"}
      },
      "error":{"httpStatusCode":500},
      "exception":true,
      "fault":true
    },
    "InvalidRequestException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"Message"}
      },
      "error":{"httpStatusCode":400},
      "exception":true
    },
    "IssueDetected":{
      "type":"structure",
      "required":["CharacterOffsets"],
      "members":{
        "CharacterOffsets":{"shape":"CharacterOffsets"}
      }
    },
    "IssuesDetected":{
      "type":"list",
      "member":{"shape":"IssueDetected"},
      "max":20,
      "min":0
    },
    "ListRealtimeContactAnalysisSegmentsRequest":{
      "type":"structure",
      "required":[
        "InstanceId",
        "ContactId"
      ],
      "members":{
        "InstanceId":{"shape":"InstanceId"},
        "ContactId":{"shape":"ContactId"},
        "MaxResults":{"shape":"MaxResults"},
        "NextToken":{"shape":"NextToken"},
        "ListFilter":{"shape":"RealTimeContactAnalysisSegmentsFilter"}
      }
    },
    "ListRealtimeContactAnalysisSegmentsResponse":{
      "type":"structure",
      "required":["Segments"],
      "members":{
        "Segments":{"shape":"RealtimeContactAnalysisSegments"},
        "NextToken":{"shape":"NextToken"}
      }
    },
    "MatchedCategories":{
      "type":"list",
      "member":{"shape":"CategoryName"},
      "max":150,
      "min":0
    },
    "MatchedDetails":{
      "type":"map",
      "key":{"shape":"CategoryName"},
      "value":{"shape":"CategoryDetails"},
      "max":150,
      "min":0
    },
    "MaxResults":{
      "type":"integer",
      "max":100,
      "min":1
    },
    "Message":{"type":"string"},
    "NextToken":{
      "type":"string",
      "max":131070,
      "min":1,
      "pattern":".*\\S.*"
    },
    "OffsetMillis":{
      "type":"integer",
      "min":0
    },
    "ParticipantId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "ParticipantRole":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    },
    "PointOfInterest":{
      "type":"structure",
      "required":[
        "BeginOffsetMillis",
        "EndOffsetMillis"
      ],
      "members":{
        "BeginOffsetMillis":{"shape":"OffsetMillis"},
        "EndOffsetMillis":{"shape":"OffsetMillis"}
      }
    },
    "PointsOfInterest":{
      "type":"list",
      "member":{"shape":"PointOfInterest"},
      "max":20,
      "min":0
    },
    "PostContactSummary":{
      "type":"structure",
      "required":["Status"],
      "members":{
        "Content":{"shape":"PostContactSummaryContent"},
        "Status":{"shape":"PostContactSummaryStatus"},
        "FailureCode":{"shape":"PostContactSummaryFailureCode"}
      }
    },
    "PostContactSummaryContent":{
      "type":"string",
      "max":1762,
      "min":1
    },
    "PostContactSummaryFailureCode":{
      "type":"string",
      "enum":[
        "QUOTA_EXCEEDED",
        "INSUFFICIENT_CONVERSATION_CONTENT",
        "FAILED_SAFETY_GUIDELINES",
        "INVALID_ANALYSIS_CONFIGURATION",
        "INTERNAL_ERROR"
      ]
    },
    "PostContactSummaryStatus":{
      "type":"string",
      "enum":[
        "FAILED",
        "COMPLETED"
      ]
    },
    "RealTimeContactAnalysisSegmentsFilter":{
      "type":"structure",
      "members":{
        "CategoriesAttributeFilter":{"shape":"CategoriesAttributeFilter"}
      }
    },
    "RealtimeContactAnalysisSegment":{
      "type":"structure",
      "members":{
        "Transcript":{"shape":"Transcript"},
        "Categories":{"shape":"Categories"},
        "PostContactSummary":{"shape":"PostContactSummary"},
        "ExtractedInformation":{"shape":"ExtractedInformation"}
      }
    },
    "RealtimeContactAnalysisSegments":{
      "type":"list",
      "member":{"shape":"RealtimeContactAnalysisSegment"},
      "max":100,
      "min":0
    },
    "ResourceNotFoundException":{
      "type":"structure",
      "members":{
        "Message":{"shape":"Message"}
      },
      "error":{"httpStatusCode":404},
      "exception":true
    },
    "RuleId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":"^\\S+$"
    },
    "SentimentValue":{
      "type":"string",
      "enum":[
        "POSITIVE",
        "NEUTRAL",
        "NEGATIVE"
      ]
    },
    "TagAndConditionList":{
      "type":"list",
      "member":{"shape":"TagCondition"},
      "max":25
    },
    "TagComparisonType":{
      "type":"string",
      "enum":[
        "EQUALS",
        "NOT_EQUALS"
      ]
    },
    "TagCondition":{
      "type":"structure",
      "members":{
        "TagKey":{"shape":"TagKey"},
        "TagValue":{"shape":"TagValue"},
        "ComparisonType":{"shape":"TagComparisonType"}
      }
    },
    "TagKey":{
      "type":"string",
      "max":128,
      "min":1
    },
    "TagValue":{
      "type":"string",
      "max":256
    },
    "ThrottlingException":{
      "type":"structure",
      "required":["Message"],
      "members":{
        "Message":{"shape":"Message"}
      },
      "error":{"httpStatusCode":429},
      "exception":true
    },
    "Transcript":{
      "type":"structure",
      "required":[
        "Id",
        "ParticipantId",
        "ParticipantRole",
        "Content",
        "BeginOffsetMillis",
        "EndOffsetMillis"
      ],
      "members":{
        "Id":{"shape":"TranscriptId"},
        "ParticipantId":{"shape":"ParticipantId"},
        "ParticipantRole":{"shape":"ParticipantRole"},
        "Content":{"shape":"TranscriptContent"},
        "BeginOffsetMillis":{"shape":"OffsetMillis"},
        "EndOffsetMillis":{"shape":"OffsetMillis"},
        "Sentiment":{"shape":"SentimentValue"},
        "IssuesDetected":{"shape":"IssuesDetected"}
      }
    },
    "TranscriptContent":{
      "type":"string",
      "min":1,
      "pattern":".*\\S.*"
    },
    "TranscriptId":{
      "type":"string",
      "max":256,
      "min":1,
      "pattern":".*\\S.*"
    }
  }
}
