diff --git a/specification/cognitiveservices/Language.AnalyzeText/client.tsp b/specification/cognitiveservices/Language.AnalyzeText/client.tsp index 948d4479ba3d..cce0c081f04e 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/client.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/client.tsp @@ -1,71 +1,974 @@ import "./main.tsp"; import "@azure-tools/typespec-client-generator-core"; -using Language.AnalyzeText; +using Language.Text; using Azure.ClientGenerator.Core; namespace Language.AnalyzeTextClientCustomizations; -@@clientName(Tasks, "TasksStatus", "csharp"); -@@clientName(State, "CurrentState", "csharp"); +@@clientName(Text, "TextAnalysis", "csharp"); + +@@clientName(Tasks, "TextActions", "csharp"); +@@clientName(State, "TextActionState", "csharp"); @@clientName(Error, "AnalyzeTextError", "csharp"); -@@clientName(TaskParameters, "TaskContent", "csharp"); -@@clientName(PreBuiltTaskParameters, "PreBuiltTaskContent", "csharp"); -@@clientName(AbstractiveSummarizationTaskParametersBase, - "AbstractiveSummarizationTaskContentBase", + +@@clientName(Match, "EntityLinkingMatch", "csharp"); +@@clientName(Entity, "NamedEntity", "csharp"); +@@clientName(EntityWithMetadata, "NamedEntityWithMetadata", "csharp"); +@@clientName(EntityInferenceOptions, "EntityInferenceConfig", "csharp"); +@@clientName(Temporality, "HealthcareAssertionTemporality", "csharp"); +@@clientName(Conditionality, "HealthcareAssertionConditionality", "csharp"); +@@clientName(Certainty, "HealthcareAssertionCertainty", "csharp"); +@@clientName(Association, "HealthcareAssertionAssociation", "csharp"); +@@clientName(SentimentResponse, "SentimentResult", "csharp"); + +@@clientName(JobState.createdDateTime, "CreatedAt", "csharp"); + +@@clientName(JobState.expirationDateTime, "ExpiresOn", "csharp"); + +@@clientName(JobState.lastUpdatedDateTime, "LastUpdatedAt", "csharp"); + +@@clientName(BaseEntityOverlapPolicy, "EntityOverlapPolicy", "csharp"); + +@@clientName(BaseTemporalMetadata, "TemporalMetadata", "csharp"); + +@@clientName(BaseTemporalMetadata.dateValues, "Dates", "csharp"); + +@@clientName(EntityCategory.GPE, "GeoPoliticalEntity", "csharp"); + +@@clientName(EntityCategory.IP, "IpAddress", "csharp"); + +@@clientName(EntityCategory.URL, "Uri", "csharp"); + +@@clientName(ErrorCode, "AnalyzeTextErrorCode", "csharp"); + +@@clientName(WarningCodeValue, "WarningCode", "csharp"); + +@@clientName(DocumentSentimentValue, "DocumentSentiment", "csharp"); + +@@clientName(TokenSentimentValue, "TokenSentiment", "csharp"); + +@@clientName(PiiCategoriesExclude.ABARoutingNumber, + "AbaRoutingNumber", "csharp" ); -@@clientName(CustomTaskParameters, "CustomTaskContent", "csharp"); -@@clientName(CustomEntitiesTaskParameters, - "CustomEntitiesTaskContent", +@@clientName(PiiCategoriesExclude.ARNationalIdentityNumber, + "ArNationalIdentityNumber", "csharp" ); -@@clientName(CustomSingleLabelClassificationTaskParameters, - "CustomSingleLabelClassificationTaskContent", +@@clientName(PiiCategoriesExclude.AUBankAccountNumber, + "AuBankAccountNumber", "csharp" ); -@@clientName(CustomMultiLabelClassificationTaskParameters, - "CustomMultiLabelClassificationTaskContent", +@@clientName(PiiCategoriesExclude.AUDriversLicenseNumber, + "AuDriversLicenseNumber", "csharp" ); -@@clientName(DynamicClassificationTaskParameters, - "DynamicClassificationTaskContent", +@@clientName(PiiCategoriesExclude.AUMedicalAccountNumber, + "AuMedicalAccountNumber", "csharp" ); -@@clientName(EntityLinkingTaskParameters, "EntityLinkingTaskContent", "csharp"); -@@clientName(Match, "EntityLinkingMatch", "csharp"); -@@clientName(EntitiesTaskParameters, "EntitiesTaskContent", "csharp"); -@@clientName(Entity, "NamedEntity", "csharp"); -@@clientName(EntityInferenceOptions, "EntityInferenceConfig", "csharp"); -@@clientName(HealthcareTaskParameters, "HealthcareTaskContent", "csharp"); -@@clientName(Temporality, "HealthcareAssertionTemporality", "csharp"); -@@clientName(Conditionality, "HealthcareAssertionConditionality", "csharp"); -@@clientName(Certainty, "HealthcareAssertionCertainty", "csharp"); -@@clientName(Association, "HealthcareAssertionAssociation", "csharp"); -@@clientName(KeyPhraseTaskParameters, "KeyPhraseTaskContent", "csharp"); -@@clientName(LanguageDetectionTaskParameters, - "LanguageDetectionTaskContent", +@@clientName(PiiCategoriesExclude.AUPassportNumber, + "AuPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.AUTaxFileNumber, "AuTaxFileNumber", "csharp"); +@@clientName(PiiCategoriesExclude.AUBusinessNumber, + "AuBusinessNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.AUCompanyNumber, "AuCompanyNumber", "csharp"); +@@clientName(PiiCategoriesExclude.ATIdentityCard, "AtIdentityCard", "csharp"); +@@clientName(PiiCategoriesExclude.ATTaxIdentificationNumber, + "AtTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ATValueAddedTaxNumber, + "AtValueAddedTaxNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.AzureDocumentDBAuthKey, + "AzureDocumentDbauthKey", + "csharp" +); +@@clientName(PiiCategoriesExclude.AzureIAASDatabaseConnectionAndSQLString, + "AzureIaasDatabaseConnectionAndSqlString", + "csharp" +); +@@clientName(PiiCategoriesExclude.AzureSAS, "AzureSas", "csharp"); +@@clientName(PiiCategoriesExclude.BENationalNumber, + "BeNationalNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.BENationalNumberV2, + "BeNationalNumberV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.BEValueAddedTaxNumber, + "BeValueAddedTaxNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.BRCPFNumber, "BrCpfNumber", "csharp"); +@@clientName(PiiCategoriesExclude.BRLegalEntityNumber, + "BrLegalEntityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.BRNationalIDRG, "BrNationalIdRg", "csharp"); +@@clientName(PiiCategoriesExclude.BGUniformCivilNumber, + "BgUniformCivilNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CABankAccountNumber, + "CaBankAccountNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CADriversLicenseNumber, + "CaDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CAHealthServiceNumber, + "CaHealthServiceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CAPassportNumber, + "CaPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CAPersonalHealthIdentification, + "CaPersonalHealthIdentification", + "csharp" +); +@@clientName(PiiCategoriesExclude.CASocialInsuranceNumber, + "CaSocialInsuranceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CLIdentityCardNumber, + "ClIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CNResidentIdentityCardNumber, + "CnResidentIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HRIdentityCardNumber, + "HrIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HRNationalIDNumber, + "HrNationalIdNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HRPersonalIdentificationNumber, + "HrPersonalIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HRPersonalIdentificationOIBNumberV2, + "HrPersonalIdentificationOIBNumberV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.CYIdentityCard, "CyIdentityCard", "csharp"); +@@clientName(PiiCategoriesExclude.CYTaxIdentificationNumber, + "CyTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CZPersonalIdentityNumber, + "CzPersonalIdentityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.CZPersonalIdentityV2, + "CzPersonalIdentityV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.DKPersonalIdentificationNumber, + "DkPersonalIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DKPersonalIdentificationV2, + "DkPersonalIdentificationV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.EEPersonalIdentificationCode, + "EePersonalIdentificationCode", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUDebitCardNumber, + "EuDebitCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUDriversLicenseNumber, + "EuDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUGPSCoordinates, + "EuGpsCoordinates", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUNationalIdentificationNumber, + "EuNationalIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUPassportNumber, + "EuPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUSocialSecurityNumber, + "EuSocialSecurityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.EUTaxIdentificationNumber, + "EuTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FIEuropeanHealthNumber, + "FiEuropeanHealthNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FINationalID, "FiNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.FINationalIDV2, "FiNationalIdV2", "csharp"); +@@clientName(PiiCategoriesExclude.FIPassportNumber, + "FiPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRDriversLicenseNumber, + "FrDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRHealthInsuranceNumber, + "FrHealthInsuranceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRNationalID, "FrNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.FRPassportNumber, + "FrPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRSocialSecurityNumber, + "FrSocialSecurityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRTaxIdentificationNumber, + "FrTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.FRValueAddedTaxNumber, + "FrValueAddedTaxNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DEDriversLicenseNumber, + "DeDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DEPassportNumber, + "DePassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DEIdentityCardNumber, + "DeIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DETaxIdentificationNumber, + "DeTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.DEValueAddedNumber, + "DeValueAddedNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.GRNationalIDCard, + "GrNationalIdCard", + "csharp" +); +@@clientName(PiiCategoriesExclude.GRNationalIDV2, "GrNationalIdV2", "csharp"); +@@clientName(PiiCategoriesExclude.GRTaxIdentificationNumber, + "GrTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HKIdentityCardNumber, + "HkIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HUValueAddedNumber, + "HuValueAddedNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HUPersonalIdentificationNumber, + "HuPersonalIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.HUTaxIdentificationNumber, + "HuTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.INPermanentAccount, + "InPermanentAccount", + "csharp" +); +@@clientName(PiiCategoriesExclude.INUniqueIdentificationNumber, + "InUniqueIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.IDIdentityCardNumber, + "IdIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.IEPersonalPublicServiceNumber, + "IePersonalPublicServiceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.IEPersonalPublicServiceNumberV2, + "IePersonalPublicServiceNumberV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.ILBankAccountNumber, + "IlBankAccountNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ILNationalID, "IlNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.ITDriversLicenseNumber, + "ItDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ITFiscalCode, "ItFiscalCode", "csharp"); +@@clientName(PiiCategoriesExclude.ITValueAddedTaxNumber, + "ItValueAddedTaxNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPBankAccountNumber, + "JpBankAccountNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPDriversLicenseNumber, + "JpDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPPassportNumber, + "JpPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPResidentRegistrationNumber, + "JpResidentRegistrationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPSocialInsuranceNumber, + "JpSocialInsuranceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPMyNumberCorporate, + "JpMyNumberCorporate", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPMyNumberPersonal, + "JpMyNumberPersonal", + "csharp" +); +@@clientName(PiiCategoriesExclude.JPResidenceCardNumber, + "JpResidenceCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.LVPersonalCode, "LvPersonalCode", "csharp"); +@@clientName(PiiCategoriesExclude.LTPersonalCode, "LtPersonalCode", "csharp"); +@@clientName(PiiCategoriesExclude.LUNationalIdentificationNumberNatural, + "LuNationalIdentificationNumberNatural", + "csharp" +); +@@clientName(PiiCategoriesExclude.LUNationalIdentificationNumberNonNatural, + "LuNationalIdentificationNumberNonNatural", + "csharp" +); +@@clientName(PiiCategoriesExclude.MYIdentityCardNumber, + "MyIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.MTIdentityCardNumber, + "MtIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.MTTaxIDNumber, "MtTaxIdNumber", "csharp"); +@@clientName(PiiCategoriesExclude.NLCitizensServiceNumber, + "NlCitizensServiceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NLCitizensServiceNumberV2, + "NlCitizensServiceNumberV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.NLTaxIdentificationNumber, + "NlTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NLValueAddedTaxNumber, + "NlValueAddedTaxNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NZBankAccountNumber, + "NzBankAccountNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NZDriversLicenseNumber, + "NzDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NZInlandRevenueNumber, + "NzInlandRevenueNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NZMinistryOfHealthNumber, + "NzMinistryOfHealthNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NZSocialWelfareNumber, + "NzSocialWelfareNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.NOIdentityNumber, + "NoIdentityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.PHUnifiedMultiPurposeIDNumber, + "PhUnifiedMultiPurposeIdNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.PLIdentityCard, "PlIdentityCard", "csharp"); +@@clientName(PiiCategoriesExclude.PLNationalID, "PlNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.PLNationalIDV2, "PlNationalIdV2", "csharp"); +@@clientName(PiiCategoriesExclude.PLPassportNumber, + "PlPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.PLTaxIdentificationNumber, + "PlTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.PLREGONNumber, "PlRegonNumber", "csharp"); +@@clientName(PiiCategoriesExclude.PTCitizenCardNumber, + "PtCitizenCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.PTCitizenCardNumberV2, + "PtCitizenCardNumberV2", + "csharp" +); +@@clientName(PiiCategoriesExclude.PTTaxIdentificationNumber, + "PtTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ROPersonalNumericalCode, + "RoPersonalNumericalCode", + "csharp" +); +@@clientName(PiiCategoriesExclude.RUPassportNumberDomestic, + "RuPassportNumberDomestic", + "csharp" +); +@@clientName(PiiCategoriesExclude.RUPassportNumberInternational, + "RuPassportNumberInternational", + "csharp" +); +@@clientName(PiiCategoriesExclude.SANationalID, "SaNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.SGNationalRegistrationIdentityCardNumber, + "SgNationalRegistrationIdentityCardNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SKPersonalNumber, + "SkPersonalNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SITaxIdentificationNumber, + "SiTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SIUniqueMasterCitizenNumber, + "SiUniqueMasterCitizenNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ZAIdentificationNumber, + "ZaIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.KRResidentRegistrationNumber, + "KrResidentRegistrationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ESDNI, "EsDni", "csharp"); +@@clientName(PiiCategoriesExclude.ESSocialSecurityNumber, + "EsSocialSecurityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.ESTaxIdentificationNumber, + "EsTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SQLServerConnectionString, + "SqlServerConnectionString", + "csharp" +); +@@clientName(PiiCategoriesExclude.SENationalID, "SeNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.SENationalIDV2, "SeNationalIdV2", "csharp"); +@@clientName(PiiCategoriesExclude.SEPassportNumber, + "SePassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SETaxIdentificationNumber, + "SeTaxIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.SWIFTCode, "SwiftCode", "csharp"); +@@clientName(PiiCategoriesExclude.CHSocialSecurityNumber, + "ChSocialSecurityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.TWNationalID, "TwNationalId", "csharp"); +@@clientName(PiiCategoriesExclude.TWPassportNumber, + "TwPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.TWResidentCertificate, + "TwResidentCertificate", + "csharp" +); +@@clientName(PiiCategoriesExclude.THPopulationIdentificationCode, + "ThPopulationIdentificationCode", + "csharp" +); +@@clientName(PiiCategoriesExclude.TRNationalIdentificationNumber, + "TrNationalIdentificationNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UKDriversLicenseNumber, + "UkDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UKElectoralRollNumber, + "UkElectoralRollNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UKNationalHealthNumber, + "UkNationalHealthNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UKNationalInsuranceNumber, + "UkNationalInsuranceNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UKUniqueTaxpayerNumber, + "UkUniqueTaxpayerNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.USUKPassportNumber, + "UsUkPassportNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.USBankAccountNumber, + "UsBankAccountNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.USDriversLicenseNumber, + "UsDriversLicenseNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.USIndividualTaxpayerIdentification, + "UsIndividualTaxpayerIdentification", + "csharp" +); +@@clientName(PiiCategoriesExclude.USSocialSecurityNumber, + "UsSocialSecurityNumber", + "csharp" +); +@@clientName(PiiCategoriesExclude.UAPassportNumberDomestic, + "UaPassportNumberDomestic", + "csharp" +); +@@clientName(PiiCategoriesExclude.UAPassportNumberInternational, + "UaPassportNumberInternational", + "csharp" +); + +@@clientName(WeightUnit.ShortTonUS, "ShortTonUs", "csharp"); +@@clientName(WeightUnit.ShortHundredWeightUS, "ShortHundredWeightUs", "csharp"); + +@@access(AnalyzeTextTask, Access.public, "csharp"); +@@clientName(AnalyzeTextTask, "AnalyzeTextInput", "csharp"); +@@clientName(AnalyzeTextTaskKind, "AnalyzeTextInputKind", "csharp"); + +@@clientName(MultiLanguageAnalysisInput, "MultiLanguageTextInput", "csharp"); +@@clientName(LanguageDetectionAnalysisInput, + "LanguageDetectionTextInput", + "csharp" +); + +@@clientName(AnalyzeTextSentimentAnalysisInput, + "TextSentimentAnalysisInput", + "csharp" +); +@@clientName(AnalyzeTextSentimentAnalysisInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextSentimentAnalysisInput.analysisInput, + "TextInput", "csharp" ); -@@clientName(PiiTaskParameters, "PiiTaskContent", "csharp"); @@clientName(SentimentAnalysisTaskParameters, - "SentimentAnalysisTaskContent", + "SentimentAnalysisActionContent", + "csharp" +); + +@@clientName(AnalyzeTextPiiEntitiesRecognitionInput, + "TextPiiEntitiesRecognitionInput", + "csharp" +); +@@clientName(AnalyzeTextPiiEntitiesRecognitionInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextPiiEntitiesRecognitionInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(PiiTaskParameters, "PiiActionContent", "csharp"); + +@@clientName(AnalyzeTextLanguageDetectionInput, + "TextLanguageDetectionInput", + "csharp" +); +@@clientName(AnalyzeTextLanguageDetectionInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextLanguageDetectionInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(LanguageDetectionTaskParameters, + "LanguageDetectionActionContent", + "csharp" +); + +@@clientName(AnalyzeTextKeyPhraseExtractionInput, + "TextKeyPhraseExtractionInput", + "csharp" +); +@@clientName(AnalyzeTextKeyPhraseExtractionInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextKeyPhraseExtractionInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(KeyPhraseTaskParameters, "KeyPhraseActionContent", "csharp"); +@@clientName(AnalyzeTextEntityRecognitionInput, + "TextEntityRecognitionInput", + "csharp" +); +@@clientName(AnalyzeTextEntityRecognitionInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextEntityRecognitionInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(EntitiesTaskParameters, "EntitiesActionContent", "csharp"); +@@clientName(EntitiesTaskParameters.exclusionList, "Exclusions", "csharp"); +@@clientName(EntitiesTaskParameters.inclusionList, "Inclusions", "csharp"); + +@@clientName(AnalyzeTextEntityLinkingInput, "TextEntityLinkingInput", "csharp"); +@@clientName(AnalyzeTextEntityLinkingInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextEntityLinkingInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(EntityLinkingTaskParameters, + "EntityLinkingActionContent", + "csharp" +); + +@@clientName(AnalyzeTextDynamicClassificationInput, + "TextDynamicClassificationInput", + "csharp" +); +@@clientName(AnalyzeTextDynamicClassificationInput.parameters, + "ActionContent", + "csharp" +); +@@clientName(AnalyzeTextDynamicClassificationInput.analysisInput, + "TextInput", + "csharp" +); +@@clientName(DynamicClassificationTaskParameters, + "DynamicClassificationActionContent", + "csharp" +); + +@@clientName(AnalyzeTextTaskResult, "AnalyzeTextResult", "csharp"); +@@clientName(AnalyzeTextTaskResultsKind, "AnalyzeTextResultsKind", "csharp"); + +@@clientName(SentimentTaskResult, "AnalyzeTextSentimentResult", "csharp"); +@@clientName(PiiTaskResult, "AnalyzeTextPiiResult", "csharp"); +@@clientName(LanguageDetectionTaskResult, + "AnalyzeTextLanguageDetectionResult", + "csharp" +); +@@clientName(EntitiesTaskResult, "AnalyzeTextEntitiesResult", "csharp"); +@@clientName(EntityLinkingTaskResult, + "AnalyzeTextEntityLinkingResult", + "csharp" +); +@@clientName(DynamicClassificationTaskResult, + "AnalyzeTextDynamicClassificationResult", + "csharp" +); +@@clientName(KeyPhraseTaskResult, "AnalyzeTextKeyPhraseResult", "csharp"); + +@@clientName(AnalyzeTextJobsInput, "AnalyzeTextOperationInput", "csharp"); +@@clientName(AnalyzeTextJobsInput.analysisInput, "TextInput", "csharp"); +@@clientName(AnalyzeTextJobsInput.tasks, "Actions", "csharp"); + +@@clientName(AnalyzeTextLROTask, "AnalyzeTextOperationAction", "csharp"); +@@clientName(AnalyzeTextLROTask.taskName, "Name", "csharp"); + +@@clientName(AnalyzeTextLROTaskKind, + "AnalyzeTextOperationActionKind", + "csharp" +); + +@@clientName(SentimentAnalysisLROTask, + "SentimentAnalysisOperationAction", + "csharp" +); +@@clientName(SentimentAnalysisLROTask.parameters, "ActionContent", "csharp"); + +@@clientName(CustomSentimentAnalysisLROTask, + "CustomSentimentAnalysisOperationAction", + "csharp" +); +@@clientName(CustomSentimentAnalysisLROTask.parameters, + "ActionContent", "csharp" ); -@@clientName(SentimentResponse, "SentimentResult", "csharp"); @@clientName(CustomSentimentAnalysisTaskParameters, - "CustomSentimentAnalysisTaskContent", + "CustomSentimentAnalysisActionContent", + "csharp" +); + +@@clientName(ExtractiveSummarizationLROTask, + "ExtractiveSummarizationOperationAction", + "csharp" +); +@@clientName(ExtractiveSummarizationLROTask.parameters, + "ActionContent", "csharp" ); @@clientName(ExtractiveSummarizationTaskParameters, - "ExtractiveSummarizationTaskContent", + "ExtractiveSummarizationActionContent", + "csharp" +); + +@@clientName(AbstractiveSummarizationLROTask, + "AbstractiveSummarizationOperationAction", + "csharp" +); +@@clientName(AbstractiveSummarizationLROTask.parameters, + "ActionContent", "csharp" ); @@clientName(AbstractiveSummarizationTaskParameters, - "AbstractiveSummarizationTaskContent", + "AbstractiveSummarizationActionContent", + "csharp" +); + +@@clientName(CustomAbstractiveSummarizationLROTask, + "CustomAbstractiveSummarizationOperationAction", + "csharp" +); +@@clientName(CustomAbstractiveSummarizationLROTask.parameters, + "ActionContent", "csharp" ); @@clientName(CustomAbstractiveSummarizationTaskParameters, - "CustomAbstractiveSummarizationTaskContent", + "CustomAbstractiveSummarizationActionContent", + "csharp" +); + +@@clientName(PiiLROTask, "PiiOperationAction", "csharp"); +@@clientName(PiiLROTask.parameters, "ActionContent", "csharp"); + +@@clientName(KeyPhraseLROTask, "KeyPhraseOperationAction", "csharp"); +@@clientName(KeyPhraseLROTask.parameters, "ActionContent", "csharp"); + +@@clientName(HealthcareLROTask, "HealthcareOperationAction", "csharp"); +@@clientName(HealthcareLROTask.parameters, "ActionContent", "csharp"); +@@clientName(HealthcareTaskParameters, "HealthcareActionContent", "csharp"); + +@@clientName(EntitiesLROTask, "EntitiesOperationAction", "csharp"); +@@clientName(EntitiesLROTask.parameters, "ActionContent", "csharp"); + +@@clientName(EntityLinkingLROTask, "EntityLinkingOperationAction", "csharp"); +@@clientName(EntityLinkingLROTask.parameters, "ActionContent", "csharp"); + +@@clientName(CustomMultiLabelClassificationLROTask, + "CustomMultiLabelClassificationOperationAction", + "csharp" +); +@@clientName(CustomMultiLabelClassificationLROTask.parameters, + "ActionContent", + "csharp" +); +@@clientName(CustomMultiLabelClassificationTaskParameters, + "CustomMultiLabelClassificationActionContent", + "csharp" +); + +@@clientName(CustomSingleLabelClassificationLROTask, + "CustomSingleLabelClassificationOperationAction", + "csharp" +); +@@clientName(CustomSingleLabelClassificationLROTask.parameters, + "ActionContent", + "csharp" +); +@@clientName(CustomSingleLabelClassificationTaskParameters, + "CustomSingleLabelClassificationActionContent", + "csharp" +); + +@@clientName(CustomEntitiesLROTask, "CustomEntitiesOperationAction", "csharp"); +@@clientName(CustomEntitiesLROTask.parameters, "ActionContent", "csharp"); +@@clientName(CustomEntitiesTaskParameters, + "CustomEntitiesActionContent", + "csharp" +); + +@@clientName(CustomHealthcareLROTask, + "CustomHealthcareOperationAction", + "csharp" +); +@@clientName(CustomHealthcareLROTask.parameters, "ActionContent", "csharp"); +@@clientName(CustomHealthcareTaskParameters, + "CustomHealthcareActionContent", "csharp" ); + +@@clientName(AnalyzeTextJobState, "AnalyzeTextOperationState", "csharp"); +@@clientName(AnalyzeTextJobState.tasks, "Actions", "csharp"); + +@@access(AnalyzeTextLROResult, Access.public, "csharp"); +@@clientName(AnalyzeTextLROResult, "AnalyzeTextOperationResult", "csharp"); +@@clientName(AnalyzeTextLROResult.taskName, "Name", "csharp"); + +@@clientName(AnalyzeTextLROResultsKind, + "AnalyzeTextOperationResultsKind", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.SentimentAnalysisLROResults, + "SentimentAnalysisOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.EntityRecognitionLROResults, + "EntityRecognitionOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.PiiEntityRecognitionLROResults, + "PiiEntityRecognitionOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.KeyPhraseExtractionLROResults, + "KeyPhraseExtractionOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.EntityLinkingLROResults, + "EntityLinkingOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.HealthcareLROResults, + "HealthcareOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomEntityRecognitionLROResults, + "CustomEntityRecognitionOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomSingleLabelClassificationLROResults, + "CustomSingleLabelClassificationOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomMultiLabelClassificationLROResults, + "CustomMultiLabelClassificationOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.ExtractiveSummarizationLROResults, + "ExtractiveSummarizationOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.AbstractiveSummarizationLROResults, + "AbstractiveSummarizationOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomHealthcareLROResults, + "CustomHealthcareOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomSentimentAnalysisLROResults, + "CustomSentimentAnalysisOperationResults", + "csharp" +); +@@clientName(AnalyzeTextLROResultsKind.CustomAbstractiveSummarizationLROResults, + "CustomAbstractiveSummarizationOperationResults", + "csharp" +); + +@@clientName(CustomAbstractiveSummarizationLROResult, + "CustomAbstractiveSummarizationOperationResult", + "csharp" +); +@@clientName(AbstractiveSummarizationLROResult, + "AbstractiveSummarizationOperationResult", + "csharp" +); +@@clientName(ExtractiveSummarizationLROResult, + "ExtractiveSummarizationOperationResult", + "csharp" +); +@@clientName(CustomSentimentAnalysisLROResult, + "CustomSentimentAnalysisOperationResult", + "csharp" +); +@@clientName(SentimentLROResult, "SentimentOperationResult", "csharp"); +@@clientName(PiiEntityRecognitionLROResult, + "PiiEntityRecognitionOperationResult", + "csharp" +); +@@clientName(KeyPhraseExtractionLROResult, + "KeyPhraseExtractionOperationResult", + "csharp" +); +@@clientName(HealthcareLROResult, "HealthcareOperationResult", "csharp"); +@@clientName(EntityRecognitionLROResult, + "EntityRecognitionOperationResult", + "csharp" +); +@@clientName(EntityLinkingLROResult, "EntityLinkingOperationResult", "csharp"); +@@clientName(CustomMultiLabelClassificationLROResult, + "CustomMultiLabelClassificationOperationResult", + "csharp" +); +@@clientName(CustomSingleLabelClassificationLROResult, + "CustomSingleLabelClassificationOperationResult", + "csharp" +); +@@clientName(CustomEntityRecognitionLROResult, + "CustomEntityRecognitionOperationResult", + "csharp" +); +@@clientName(CustomHealthcareLROResult, + "CustomHealthcareOperationResult", + "csharp" +); + +@@clientName(analyzeTextSubmitJob, "AnalyzeTextSubmitOperation", "csharp"); +@@clientName(analyzeTextJobStatus, "AnalyzeTextOperationStatus", "csharp"); +@@clientName(analyzeTextCancelJob, "AnalyzeTextCancelOperation", "csharp"); diff --git a/specification/cognitiveservices/Language.AnalyzeText/main.tsp b/specification/cognitiveservices/Language.AnalyzeText/main.tsp index c276f5a7bdda..db496e0bfd66 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/main.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/main.tsp @@ -19,13 +19,16 @@ using TypeSpec.Rest; using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; - /** The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.0 */ @useAuth( - TypeSpec.Http.ApiKeyAuth< - TypeSpec.Http.ApiKeyLocation.header, - "Ocp-Apim-Subscription-Key" - > + ApiKeyAuth | OAuth2Auth<[ + { + type: OAuth2FlowType.authorizationCode, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + tokenUrl: "https://login.microsoftonline.com/common/oauth2/token", + scopes: ["https://cognitiveservices.azure.com/.default"], + } + ]> ) @service({ title: "Microsoft Cognitive Language Service - Text Analysis", @@ -39,7 +42,7 @@ using Azure.Core.Traits; } ) @versioned(Versions) -namespace Language.AnalyzeText; +namespace Language.Text; /** Analyze Conversations Service Versions */ enum Versions { @@ -67,7 +70,7 @@ alias languageOperations = ResourceOperations; @post @route("/:analyze-text") op analyzeText is RpcOperation< - AnalyzeTextTask & AnalyzeTextQueryParameters, + AnalyzeTextBody & AnalyzeTextQueryParameters, AnalyzeTextTaskResult, {}, ErrorResponse diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp index 052df856037a..143490d1906c 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp @@ -10,7 +10,7 @@ using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; -namespace Language.AnalyzeText; +namespace Language.Text; /** These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts. */ #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Model types must use PascalCase" @@ -485,9 +485,17 @@ model PreBuiltTaskParameters is TaskParameters { modelVersion?: string = "latest"; } +alias AnalyzeTextBody = { + /** The input documents to analyze. */ + @body + @clientName("analyzeTextInput", "csharp") + body: AnalyzeTextTask; +}; + alias ShowStatsQueryParameter = QueryParametersTrait<{ /** (Optional) if set to true, response will contain request and document level statistics. */ @query + @clientName("showStatistics", "csharp") showStats?: boolean; }>; @@ -508,6 +516,7 @@ alias AnalyzeTextJobQueryParameters = QueryParametersTrait<{ alias AnalyzeTextQueryParameters = { /** (Optional) if set to true, response will contain request and document level statistics. */ @query + @clientName("showStatistics", "csharp") showStats?: boolean; }; diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp index 4c1fb9aabdbd..26e08adb2fec 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp @@ -1,9 +1,10 @@ import "@typespec/versioning"; +using Language.Text; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Supported parameters for a custom Healthcare task. */ @added(Versions.v2023_11_15_preview) model CustomHealthcareTaskParameters is CustomTaskParameters { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp index ee612ada5fcf..0dfedb3a3ada 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp @@ -8,7 +8,7 @@ using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Supported parameters for a Custom Entities task. */ model CustomEntitiesTaskParameters is CustomTaskParameters { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp index b4e43671fc75..a4e8d519172c 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Contains the analyze text Entity linking input. */ model AnalyzeTextEntityLinkingInput extends AnalyzeTextTask { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp index 79a85d32bd4f..c5471269787e 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** The entity recognition analyze text input task request. */ model AnalyzeTextEntityRecognitionInput extends AnalyzeTextTask { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp index 7ceb95ddcf54..2ba3fa8ac8a4 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Versioning; using Azure.Core; -namespace Language.AnalyzeText; +namespace Language.Text; /** Supported parameters for a Healthcare task. */ model HealthcareTaskParameters is PreBuiltTaskParameters { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp index 30c753d5478d..e95827421407 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; @doc("Contains the analyze text KeyPhraseExtraction task input.") model AnalyzeTextKeyPhraseExtractionInput extends AnalyzeTextTask { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp index 00a40629fd83..5d0a1f76fe50 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Contains the language detection document analysis input. */ model LanguageDetectionAnalysisInput { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp index 9e85688251ce..15ba37ca0377 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Contains the analyze text PIIEntityRecognition task input. */ #suppress "@azure-tools/typespec-azure-core/casing-style" diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp index 2b0d1d028d16..05dcc9646097 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp @@ -6,7 +6,7 @@ using Azure.ClientGenerator.Core; using TypeSpec.Versioning; using Azure.Core; -namespace Language.AnalyzeText; +namespace Language.Text; /** Contains the analyze text SentimentAnalysis task input. */ model AnalyzeTextSentimentAnalysisInput extends AnalyzeTextTask { diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp index 0b740445bbdf..2a058893a2a6 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp +++ b/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp @@ -4,7 +4,7 @@ import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -namespace Language.AnalyzeText; +namespace Language.Text; /** Supported parameters for an Extractive Summarization task. */ @added(Versions.v2023_04_01) @@ -107,7 +107,7 @@ model AbstractiveSummarizationLROTask extends AnalyzeTextLROTask { kind: AnalyzeTextLROTaskKind.AbstractiveSummarization; /** Parameters for the Abstractive Summarization task. */ - parameters: AbstractiveSummarizationTaskParameters; + parameters?: AbstractiveSummarizationTaskParameters; } /** Supported parameters for the pre-built Abstractive Summarization task. */ diff --git a/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml b/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml index 1dd04139383f..ff38a8d5fd53 100644 --- a/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml +++ b/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml @@ -18,5 +18,6 @@ options: package-dir: "Azure.AI.Language.AnalyzeText" clear-output-folder: true model-namespace: false - namespace: "Azure.AI.Language.AnalyzeText" + namespace: "Azure.AI.Language.Text" flavor: azure + generate-protocol-methods: true diff --git a/specification/cognitiveservices/Language.Conversations/client.tsp b/specification/cognitiveservices/Language.Conversations/client.tsp index 55b51393af61..94291f8c7c12 100644 --- a/specification/cognitiveservices/Language.Conversations/client.tsp +++ b/specification/cognitiveservices/Language.Conversations/client.tsp @@ -6,6 +6,9 @@ using Language.Conversations; namespace Language.ConversationsClientCustomizations; +@@clientName(Conversations, "ConversationAnalysis", "csharp"); +@@clientName(analyzeConversations, "AnalyzeConversation", "csharp"); + @@clientName(ConversationEntity.confidenceScore, "confidence", "csharp"); @@clientName(ConversationIntent.confidenceScore, "confidence", "csharp"); @@clientName(TargetIntentResult.confidenceScore, "confidence", "csharp"); @@ -31,3 +34,220 @@ namespace Language.ConversationsClientCustomizations; "csharp" ); @@clientName(ShortAnswerOptions.topAnswersWithSpan, "top", "csharp"); + +@@clientName(AnalyzeConversationLROTask, + "AnalyzeConversationOperationAction", + "csharp" +); + +@@clientName(AnalyzeConversationLROTask.taskName, "Name", "csharp"); + +@@clientName(BasePrediction, "PredictionBase", "csharp"); + +@@clientName(LengthUnit.Pt, "Point", "csharp"); +@@clientName(LogicalOperationKind.AND, "And", "csharp"); +@@clientName(LogicalOperationKind.OR, "Or", "csharp"); + +@@clientName(redactionCharacter.perCent, "Percent", "csharp"); + +@@clientName(TemporalModifier.AfterApprox, "AfterApproximate", "csharp"); +@@clientName(TemporalModifier.BeforeApprox, "BeforeApproximate", "csharp"); +@@clientName(TemporalModifier.Approx, "Approximate", "csharp"); + +@@clientName(RedactedTranscriptContent.itn, "InverseTextNormalized", "csharp"); +@@clientName(RedactedTranscriptContent.maskedItn, + "MaskedInverseTextNormalized", + "csharp" +); +@@clientName(Error, "ConversationError", "csharp"); + +@@clientName(AnalysisParameters, "AnalysisConfig", "csharp"); +@@clientName(LuisParameters, "LuisConfig", "csharp"); +@@clientName(ConversationParameters, "ConversationConfig", "csharp"); +@@clientName(QuestionAnsweringParameters, "QuestionAnsweringConfig", "csharp"); +@@clientName(AnswersOptions, "QuestionAnswersConfig", "csharp"); +@@clientName(ShortAnswerOptions, "ShortAnswerConfig", "csharp"); +@@clientName(ConversationCallingOptions, "ConversationCallingConfig", "csharp"); +@@clientName(LuisCallingOptions, "LuisCallingConfig", "csharp"); + +@@clientName(ConversationAnalysisOptions, + "ConversationAnalysisInput", + "csharp" +); + +@@clientName(Tasks, "ConversationActions", "csharp"); +@@clientName(State, "ConversationActionState", "csharp"); +@@clientName(role, "ParticipantRole", "csharp"); + +@@clientName(Entity, "NamedEntity", "csharp"); + +@@clientName(CustomConversationSummarizationTaskParameters, + "CustomConversationSummarizationActionContent", + "csharp" +); +@@clientName(ConversationTaskParameters, "ConversationActionContent", "csharp"); +@@clientName(ConversationSummarizationTaskParameters, + "ConversationSummarizationActionContent", + "csharp" +); +@@clientName(ConversationPiiTaskParameters, + "ConversationPiiActionContent", + "csharp" +); + +@@clientName(Conversation, "ConversationInput", "csharp"); + +@@clientName(ConversationPiiCategories.USSocialSecurityNumber, + "UsSocialSecurityNumber", + "csharp" +); +@@clientName(ConversationPiiCategoriesExclude, + "ConversationPiiCategoryExclusions", + "csharp" +); +@@clientName(ConversationPiiCategoriesExclude.USSocialSecurityNumber, + "UsSocialSecurityNumber", + "csharp" +); +@@clientName(ErrorCode, "ConversationErrorCode", "csharp"); + +@@clientName(BaseResolution, "ResolutionBase", "csharp"); +@@clientName(BaseExtraInformation, + "ConversationEntityExtraInformation", + "csharp" +); + +@@clientName(TranscriptConversationItem.itn, "InverseTextNormalized", "csharp"); +@@clientName(TranscriptConversationItem.maskedItn, + "MaskedInverseTextNormalized", + "csharp" +); + +@@clientName(AnalyzeConversationTask, "AnalyzeConversationInput", "csharp"); +@@clientName(AnalyzeConversationTaskKind, + "AnalyzeConversationInputKind", + "csharp" +); + +@@clientName(ConversationalTask, "ConversationalInput", "csharp"); +@@clientName(ConversationalTask.analysisInput, "ConversationInput", "csharp"); +@@clientName(ConversationalTask.parameters, "ActionContent", "csharp"); +@@clientName(ConversationTaskParameters, "ConversationActionContent", "csharp"); + +@@clientName(AnalyzeConversationTaskResult, + "AnalyzeConversationActionResult", + "csharp" +); +@@clientName(AnalyzeConversationTaskResultsKind, + "AnalyzeConversationResultKind", + "csharp" +); + +@@clientName(ConversationalTaskResult, "ConversationActionResult", "csharp"); + +@@clientName(MultiLanguageConversationAnalysisInput, + "MultiLanguageConversationInput" +); + +@@clientName(AnalyzeConversationJobsInput, + "AnalyzeConversationOperationInput", + "csharp" +); +@@clientName(AnalyzeConversationJobsInput.analysisInput, + "ConversationInput", + "csharp" +); +@@clientName(AnalyzeConversationJobsInput.tasks, "Actions", "csharp"); + +@@clientName(AnalyzeConversationLROTask, "AnalyzeConversationOperationAction"); +@@clientName(AnalyzeConversationLROTask.taskName, "Name", "csharp"); + +@@clientName(AnalyzeConversationLROTaskKind, + "AnalyzeConversationOperationActionKind", + "csharp" +); + +@@clientName(AnalyzeConversationPiiTask, "PiiOperationAction", "csharp"); +@@clientName(AnalyzeConversationPiiTask.parameters, "ActionContent", "csharp"); +@@clientName(ConversationPiiTaskParameters, "PiiActionContent", "csharp"); + +@@clientName(AnalyzeCustomConversationSummarizationTask, + "CustomSummarizationOperationAction", + "csharp" +); +@@clientName(AnalyzeCustomConversationSummarizationTask.parameters, + "ActionContent", + "csharp" +); +@@clientName(CustomConversationSummarizationTaskParameters, + "CustomConversationSummarizationActionContent", + "csharp" +); + +@@clientName(AnalyzeConversationSummarizationTask, + "SummarizationOperationAction", + "csharp" +); +@@clientName(AnalyzeConversationSummarizationTask.parameters, + "ActionContent", + "csharp" +); +@@clientName(ConversationSummarizationTaskParameters, + "ConversationSummarizationActionContent", + "csharp" +); + +@@clientName(AnalyzeConversationJobState, + "AnalyzeConversationOperationState", + "csharp" +); +@@clientName(AnalyzeConversationJobState.tasks, "Actions", "csharp"); + +@@clientName(AnalyzeConversationJobResult, + "AnalyzeConversationOperationResult", + "csharp" +); +@@clientName(AnalyzeConversationJobResult.taskName, "Name", "csharp"); + +@@clientName(AnalyzeConversationResultsKind, + "AnalyzeConversationOperationResultsKind", + "csharp" +); +@@clientName(AnalyzeConversationResultsKind.ConversationalSummarizationResults, + "SummarizationOperationResults", + "csharp" +); +@@clientName(AnalyzeConversationResultsKind.ConversationalPIIResults, + "PiiOperationResults", + "csharp" +); +@@clientName(AnalyzeConversationResultsKind.CustomConversationalSummarizationResults, + "CustomSummarizationOperationResults", + "csharp" +); + +@@clientName(AnalyzeConversationConversationPiiResult, + "ConversationPiiOperationResult", + "csharp" +); +@@clientName(AnalyzeConversationSummarizationResult, + "SummarizationOperationResult", + "csharp" +); +@@clientName(AnalyzeCustomConversationSummarizationResult, + "CustomSummarizationOperationResult", + "csharp" +); + +@@clientName(analyzeConversationsSubmitJob, + "AnalyzeConversationSubmitOperation", + "csharp" +); +@@clientName(analyzeConversationsJobStatus, + "GetAnalyzeConversationJobStatus", + "csharp" +); +@@clientName(analyzeConversationsCancelJob, + "CancelAnalyzeConversations", + "csharp" +); diff --git a/specification/cognitiveservices/Language.Conversations/common.tsp b/specification/cognitiveservices/Language.Conversations/common.tsp index 8fea385220f2..37321d490bb7 100644 --- a/specification/cognitiveservices/Language.Conversations/common.tsp +++ b/specification/cognitiveservices/Language.Conversations/common.tsp @@ -2,7 +2,9 @@ import "@typespec/rest"; import "@typespec/http"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-client-generator-core"; +using Azure.ClientGenerator.Core; using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; @@ -130,6 +132,7 @@ model PreBuiltTaskParameters is TaskParameters { alias ShowStatsQueryParameter = QueryParametersTrait<{ /** (Optional) if set to true, response will contain request and document level statistics. */ @query + @clientName("showStatistics", "csharp") showStats?: boolean; }>; diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json index 2311c12a9a19..a1b0ed2f798d 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json index faab96c58233..4185c739a9b5 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json index 9bb019ec6772..140ac9bc453a 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index 208290d2b267..083a82355920 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json index f6ee2c914a85..e379a775a24a 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json index 72221e7c7a24..33bfb6c2f6bb 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSentimentResults", + "kind": "conversationalSentimentResults", "taskName": "Conversation Sentiment", "lastUpdateDateTime": "2022-04-01T15:00:45Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json index 7be32fe638d1..07718a8f8779 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIExclusionTaskStatusRequest.json index 965f6bc37663..ceed82f627ef 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index 8829600a5ebc..2552943ba06b 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIITaskStatusRequest.json index 629b44ea467b..27d21a69cce2 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationPIITaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskResult.json index 469ae6437583..d4204c80bfe3 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskStatusRequest.json index 7b318ae457aa..067a54d9769f 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-01/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json index 6efa2d3e5e67..9e7801933ebc 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index 87ce4feeeb1d..e2b3ea2499ad 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIITaskStatusRequest.json index 5ea42814aa8e..c9c0ce430777 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationPIITaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskResult.json index b5a4c5368deb..eca89232337e 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json index 2fe8ec2c85cb..2cb92a853eda 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json index 8f7c5b1ba52c..bd961e99ed76 100644 --- a/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2024-05-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "CustomConversationalSummarizationResults", + "kind": "customConversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Custom Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/Language.Conversations/main.tsp b/specification/cognitiveservices/Language.Conversations/main.tsp index c2c1e8190d50..0e8134f6e8d3 100644 --- a/specification/cognitiveservices/Language.Conversations/main.tsp +++ b/specification/cognitiveservices/Language.Conversations/main.tsp @@ -2,8 +2,10 @@ import "@typespec/rest"; import "@typespec/http"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-client-generator-core"; import "./common.tsp"; +using Azure.ClientGenerator.Core; using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; @@ -12,10 +14,14 @@ using Azure.Core.Traits; /** The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection. */ @useAuth( - TypeSpec.Http.ApiKeyAuth< - TypeSpec.Http.ApiKeyLocation.header, - "Ocp-Apim-Subscription-Key" - > + ApiKeyAuth | OAuth2Auth<[ + { + type: OAuth2FlowType.authorizationCode, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + tokenUrl: "https://login.microsoftonline.com/common/oauth2/token", + scopes: ["https://cognitiveservices.azure.com/.default"], + } + ]> ) @service({ title: "Microsoft Cognitive Language Service - Analyze Conversations", @@ -671,15 +677,15 @@ union AnalyzeConversationResultsKind { /** Conversational Summarization Results */ @added(Versions.v2023_04_01) - ConversationalSummarizationResults: "ConversationalSummarizationResults", + ConversationalSummarizationResults: "conversationalSummarizationResults", /** Conversational PII Results */ @added(Versions.v2024_05_01) - ConversationalPIIResults: "ConversationalPIIResults", + ConversationalPIIResults: "conversationalPIIResults", /** Custom Conversational Summarization Results */ @added(Versions.v2024_05_15_preview) - CustomConversationalSummarizationResults: "CustomConversationalSummarizationResults", + CustomConversationalSummarizationResults: "customConversationalSummarizationResults", } /** Contains the status of the submitted job for analyzing a conversation, along with related statistics. */ @@ -1907,7 +1913,12 @@ alias languageOperations = ResourceOperations; @post @route("/:analyze-conversations") op analyzeConversations is RpcOperation< - AnalyzeConversationTask, + { + /** The input for the analyze conversations operation. */ + @bodyRoot + @clientName("AnalyzeConversationInput", "csharp") + body: AnalyzeConversationTask; + }, AnalyzeConversationTaskResult, {}, ErrorResponse @@ -1927,7 +1938,12 @@ op analyzeConversationsJobStatus is languageOperations.ResourceRead< @route("/analyze-conversations/jobs") @pollingOperation(analyzeConversationsJobStatus) op analyzeConversationsSubmitJob is Foundations.LongRunningOperation< - AnalyzeConversationJobsInput, + { + /** The input for the analyze conversations operation. */ + @bodyRoot + @clientName("AnalyzeConversationOperationInput", "csharp") + body: AnalyzeConversationJobsInput; + }, AcceptedResponse, {}, ErrorResponse diff --git a/specification/cognitiveservices/Language.Conversations/tspconfig.yaml b/specification/cognitiveservices/Language.Conversations/tspconfig.yaml index f6fec2779b39..ee5bee61bca5 100644 --- a/specification/cognitiveservices/Language.Conversations/tspconfig.yaml +++ b/specification/cognitiveservices/Language.Conversations/tspconfig.yaml @@ -17,6 +17,6 @@ options: "@azure-tools/typespec-csharp": package-dir: "Azure.AI.Language.Conversations" clear-output-folder: true - model-namespace: false + model-namespace: true namespace: "Azure.AI.Language.Conversations" flavor: azure diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json index 741ef3c35a43..193e1380e5c6 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -64,6 +78,7 @@ { "name": "body", "in": "body", + "description": "The input documents to analyze.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" @@ -366,9 +381,6 @@ "description": "Parameters for the Abstractive Summarization task." } }, - "required": [ - "parameters" - ], "allOf": [ { "$ref": "#/definitions/AnalyzeTextLROTask" diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/analyzeconversations.json index cc500468ee76..884abccd8978 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/analyzeconversations.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -57,6 +71,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" @@ -107,6 +122,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationJobsInput" @@ -381,7 +397,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "ConversationalPIIResults" + "x-ms-discriminator-value": "conversationalPIIResults" }, "AnalyzeConversationJobResult": { "type": "object", @@ -593,9 +609,9 @@ "type": "string", "description": "Enumeration of results for supported conversation analysis Results.", "enum": [ - "ConversationalSummarizationResults", - "ConversationalPIIResults", - "CustomConversationalSummarizationResults" + "conversationalSummarizationResults", + "conversationalPIIResults", + "customConversationalSummarizationResults" ], "x-ms-enum": { "name": "AnalyzeConversationResultsKind", @@ -603,17 +619,17 @@ "values": [ { "name": "ConversationalSummarizationResults", - "value": "ConversationalSummarizationResults", + "value": "conversationalSummarizationResults", "description": "Conversational Summarization Results" }, { "name": "ConversationalPIIResults", - "value": "ConversationalPIIResults", + "value": "conversationalPIIResults", "description": "Conversational PII Results" }, { "name": "CustomConversationalSummarizationResults", - "value": "CustomConversationalSummarizationResults", + "value": "customConversationalSummarizationResults", "description": "Custom Conversational Summarization Results" } ] @@ -636,7 +652,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "ConversationalSummarizationResults" + "x-ms-discriminator-value": "conversationalSummarizationResults" }, "AnalyzeConversationSummarizationTask": { "type": "object", @@ -739,7 +755,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "CustomConversationalSummarizationResults" + "x-ms-discriminator-value": "customConversationalSummarizationResults" }, "AnalyzeCustomConversationSummarizationTask": { "type": "object", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json index 6efa2d3e5e67..9e7801933ebc 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index 87ce4feeeb1d..e2b3ea2499ad 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json index 5ea42814aa8e..c9c0ce430777 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json index b5a4c5368deb..eca89232337e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json index 2fe8ec2c85cb..2cb92a853eda 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json index 8f7c5b1ba52c..bd961e99ed76 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2024-05-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "CustomConversationalSummarizationResults", + "kind": "customConversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Custom Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json index 28dbb60e0de3..f0531ba990ab 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -57,6 +71,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json index 934cdfe7ae9e..d5e9e244b00c 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -64,6 +78,7 @@ { "name": "body", "in": "body", + "description": "The input documents to analyze.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json index 680bb55d9d85..a6adeb68d6a8 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -57,6 +71,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" @@ -107,6 +122,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationJobsInput" @@ -522,7 +538,7 @@ "type": "string", "description": "Enumeration of results for supported conversation analysis Results.", "enum": [ - "ConversationalSummarizationResults" + "conversationalSummarizationResults" ], "x-ms-enum": { "name": "AnalyzeConversationResultsKind", @@ -530,7 +546,7 @@ "values": [ { "name": "ConversationalSummarizationResults", - "value": "ConversationalSummarizationResults", + "value": "conversationalSummarizationResults", "description": "Conversational Summarization Results" } ] @@ -553,7 +569,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "ConversationalSummarizationResults" + "x-ms-discriminator-value": "conversationalSummarizationResults" }, "AnalyzeConversationSummarizationTask": { "type": "object", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json index af36218dc66e..db85a22a09e0 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -64,6 +78,7 @@ { "name": "body", "in": "body", + "description": "The input documents to analyze.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" @@ -315,9 +330,6 @@ "description": "Parameters for the Abstractive Summarization task." } }, - "required": [ - "parameters" - ], "allOf": [ { "$ref": "#/definitions/AnalyzeTextLROTask" diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json index 2311c12a9a19..a1b0ed2f798d 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json index faab96c58233..4185c739a9b5 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/analyzeconversations.json index 49ad01b16a00..9f457763a8a5 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/analyzeconversations.json @@ -35,6 +35,11 @@ "security": [ { "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] } ], "securityDefinitions": { @@ -42,6 +47,15 @@ "type": "apiKey", "name": "Ocp-Apim-Subscription-Key", "in": "header" + }, + "OAuth2Auth": { + "type": "oauth2", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], @@ -57,6 +71,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" @@ -107,6 +122,7 @@ { "name": "body", "in": "body", + "description": "The input for the analyze conversations operation.", "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationJobsInput" @@ -375,7 +391,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "ConversationalPIIResults" + "x-ms-discriminator-value": "conversationalPIIResults" }, "AnalyzeConversationJobResult": { "type": "object", @@ -581,8 +597,8 @@ "type": "string", "description": "Enumeration of results for supported conversation analysis Results.", "enum": [ - "ConversationalSummarizationResults", - "ConversationalPIIResults" + "conversationalSummarizationResults", + "conversationalPIIResults" ], "x-ms-enum": { "name": "AnalyzeConversationResultsKind", @@ -590,12 +606,12 @@ "values": [ { "name": "ConversationalSummarizationResults", - "value": "ConversationalSummarizationResults", + "value": "conversationalSummarizationResults", "description": "Conversational Summarization Results" }, { "name": "ConversationalPIIResults", - "value": "ConversationalPIIResults", + "value": "conversationalPIIResults", "description": "Conversational PII Results" } ] @@ -618,7 +634,7 @@ "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "x-ms-discriminator-value": "ConversationalSummarizationResults" + "x-ms-discriminator-value": "conversationalSummarizationResults" }, "AnalyzeConversationSummarizationTask": { "type": "object", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json index 965f6bc37663..ceed82f627ef 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index 8829600a5ebc..2552943ba06b 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIITaskStatusRequest.json index 629b44ea467b..27d21a69cce2 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationPIITaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalPIIResults", + "kind": "conversationalPIIResults", "taskName": "Conversation PII", "lastUpdateDateTime": "2022-01-25T15:01:03Z", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskResult.json index 469ae6437583..d4204c80bfe3 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskResult.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "Conversation Summarization Task 1", "status": "succeeded", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json index 7b318ae457aa..067a54d9769f 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2024-05-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -24,7 +24,7 @@ "total": 1, "items": [ { - "kind": "ConversationalSummarizationResults", + "kind": "conversationalSummarizationResults", "lastUpdateDateTime": "2022-04-01T15:00:49Z", "taskName": "analyze 1", "status": "succeeded",