@azure/arm-support 3.0.1-alpha.20250718.1 → 3.0.1-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/microsoftSupport.js +26 -5
  4. package/dist/browser/microsoftSupport.js.map +1 -1
  5. package/dist/browser/models/mappers.js +28 -12
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/chatTranscripts.js +23 -40
  8. package/dist/browser/operations/chatTranscripts.js.map +1 -1
  9. package/dist/browser/operations/chatTranscriptsNoSubscription.js +23 -40
  10. package/dist/browser/operations/chatTranscriptsNoSubscription.js.map +1 -1
  11. package/dist/browser/operations/communications.js +34 -46
  12. package/dist/browser/operations/communications.js.map +1 -1
  13. package/dist/browser/operations/communicationsNoSubscription.js +34 -46
  14. package/dist/browser/operations/communicationsNoSubscription.js.map +1 -1
  15. package/dist/browser/operations/fileWorkspaces.js +1 -0
  16. package/dist/browser/operations/fileWorkspaces.js.map +1 -1
  17. package/dist/browser/operations/fileWorkspacesNoSubscription.js +1 -0
  18. package/dist/browser/operations/fileWorkspacesNoSubscription.js.map +1 -1
  19. package/dist/browser/operations/files.js +23 -40
  20. package/dist/browser/operations/files.js.map +1 -1
  21. package/dist/browser/operations/filesNoSubscription.js +23 -40
  22. package/dist/browser/operations/filesNoSubscription.js.map +1 -1
  23. package/dist/browser/operations/operations.js +10 -27
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/problemClassifications.js +10 -27
  26. package/dist/browser/operations/problemClassifications.js.map +1 -1
  27. package/dist/browser/operations/services.js +10 -27
  28. package/dist/browser/operations/services.js.map +1 -1
  29. package/dist/browser/operations/supportTickets.js +34 -46
  30. package/dist/browser/operations/supportTickets.js.map +1 -1
  31. package/dist/browser/operations/supportTicketsNoSubscription.js +34 -46
  32. package/dist/browser/operations/supportTicketsNoSubscription.js.map +1 -1
  33. package/dist/browser/pagingHelper.js +2 -4
  34. package/dist/browser/pagingHelper.js.map +1 -1
  35. package/dist/commonjs/lroImpl.js +7 -3
  36. package/dist/commonjs/lroImpl.js.map +1 -1
  37. package/dist/commonjs/microsoftSupport.js +26 -5
  38. package/dist/commonjs/microsoftSupport.js.map +1 -1
  39. package/dist/commonjs/models/mappers.js +28 -12
  40. package/dist/commonjs/models/mappers.js.map +1 -1
  41. package/dist/commonjs/operations/chatTranscripts.js +23 -39
  42. package/dist/commonjs/operations/chatTranscripts.js.map +1 -1
  43. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js +23 -39
  44. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js.map +1 -1
  45. package/dist/commonjs/operations/communications.js +34 -45
  46. package/dist/commonjs/operations/communications.js.map +1 -1
  47. package/dist/commonjs/operations/communicationsNoSubscription.js +34 -45
  48. package/dist/commonjs/operations/communicationsNoSubscription.js.map +1 -1
  49. package/dist/commonjs/operations/fileWorkspaces.js +1 -0
  50. package/dist/commonjs/operations/fileWorkspaces.js.map +1 -1
  51. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js +1 -0
  52. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js.map +1 -1
  53. package/dist/commonjs/operations/files.js +23 -39
  54. package/dist/commonjs/operations/files.js.map +1 -1
  55. package/dist/commonjs/operations/filesNoSubscription.js +23 -39
  56. package/dist/commonjs/operations/filesNoSubscription.js.map +1 -1
  57. package/dist/commonjs/operations/operations.js +10 -26
  58. package/dist/commonjs/operations/operations.js.map +1 -1
  59. package/dist/commonjs/operations/problemClassifications.js +10 -26
  60. package/dist/commonjs/operations/problemClassifications.js.map +1 -1
  61. package/dist/commonjs/operations/services.js +10 -26
  62. package/dist/commonjs/operations/services.js.map +1 -1
  63. package/dist/commonjs/operations/supportTickets.js +34 -45
  64. package/dist/commonjs/operations/supportTickets.js.map +1 -1
  65. package/dist/commonjs/operations/supportTicketsNoSubscription.js +34 -45
  66. package/dist/commonjs/operations/supportTicketsNoSubscription.js.map +1 -1
  67. package/dist/commonjs/pagingHelper.js +2 -4
  68. package/dist/commonjs/pagingHelper.js.map +1 -1
  69. package/dist/commonjs/tsdoc-metadata.json +11 -11
  70. package/dist/esm/lroImpl.js +7 -3
  71. package/dist/esm/lroImpl.js.map +1 -1
  72. package/dist/esm/microsoftSupport.js +26 -5
  73. package/dist/esm/microsoftSupport.js.map +1 -1
  74. package/dist/esm/models/mappers.js +28 -12
  75. package/dist/esm/models/mappers.js.map +1 -1
  76. package/dist/esm/operations/chatTranscripts.js +23 -40
  77. package/dist/esm/operations/chatTranscripts.js.map +1 -1
  78. package/dist/esm/operations/chatTranscriptsNoSubscription.js +23 -40
  79. package/dist/esm/operations/chatTranscriptsNoSubscription.js.map +1 -1
  80. package/dist/esm/operations/communications.js +34 -46
  81. package/dist/esm/operations/communications.js.map +1 -1
  82. package/dist/esm/operations/communicationsNoSubscription.js +34 -46
  83. package/dist/esm/operations/communicationsNoSubscription.js.map +1 -1
  84. package/dist/esm/operations/fileWorkspaces.js +1 -0
  85. package/dist/esm/operations/fileWorkspaces.js.map +1 -1
  86. package/dist/esm/operations/fileWorkspacesNoSubscription.js +1 -0
  87. package/dist/esm/operations/fileWorkspacesNoSubscription.js.map +1 -1
  88. package/dist/esm/operations/files.js +23 -40
  89. package/dist/esm/operations/files.js.map +1 -1
  90. package/dist/esm/operations/filesNoSubscription.js +23 -40
  91. package/dist/esm/operations/filesNoSubscription.js.map +1 -1
  92. package/dist/esm/operations/operations.js +10 -27
  93. package/dist/esm/operations/operations.js.map +1 -1
  94. package/dist/esm/operations/problemClassifications.js +10 -27
  95. package/dist/esm/operations/problemClassifications.js.map +1 -1
  96. package/dist/esm/operations/services.js +10 -27
  97. package/dist/esm/operations/services.js.map +1 -1
  98. package/dist/esm/operations/supportTickets.js +34 -46
  99. package/dist/esm/operations/supportTickets.js.map +1 -1
  100. package/dist/esm/operations/supportTicketsNoSubscription.js +34 -46
  101. package/dist/esm/operations/supportTicketsNoSubscription.js.map +1 -1
  102. package/dist/esm/pagingHelper.js +2 -4
  103. package/dist/esm/pagingHelper.js.map +1 -1
  104. package/dist/react-native/lroImpl.js +7 -3
  105. package/dist/react-native/lroImpl.js.map +1 -1
  106. package/dist/react-native/microsoftSupport.js +26 -5
  107. package/dist/react-native/microsoftSupport.js.map +1 -1
  108. package/dist/react-native/models/mappers.js +28 -12
  109. package/dist/react-native/models/mappers.js.map +1 -1
  110. package/dist/react-native/operations/chatTranscripts.js +23 -40
  111. package/dist/react-native/operations/chatTranscripts.js.map +1 -1
  112. package/dist/react-native/operations/chatTranscriptsNoSubscription.js +23 -40
  113. package/dist/react-native/operations/chatTranscriptsNoSubscription.js.map +1 -1
  114. package/dist/react-native/operations/communications.js +34 -46
  115. package/dist/react-native/operations/communications.js.map +1 -1
  116. package/dist/react-native/operations/communicationsNoSubscription.js +34 -46
  117. package/dist/react-native/operations/communicationsNoSubscription.js.map +1 -1
  118. package/dist/react-native/operations/fileWorkspaces.js +1 -0
  119. package/dist/react-native/operations/fileWorkspaces.js.map +1 -1
  120. package/dist/react-native/operations/fileWorkspacesNoSubscription.js +1 -0
  121. package/dist/react-native/operations/fileWorkspacesNoSubscription.js.map +1 -1
  122. package/dist/react-native/operations/files.js +23 -40
  123. package/dist/react-native/operations/files.js.map +1 -1
  124. package/dist/react-native/operations/filesNoSubscription.js +23 -40
  125. package/dist/react-native/operations/filesNoSubscription.js.map +1 -1
  126. package/dist/react-native/operations/operations.js +10 -27
  127. package/dist/react-native/operations/operations.js.map +1 -1
  128. package/dist/react-native/operations/problemClassifications.js +10 -27
  129. package/dist/react-native/operations/problemClassifications.js.map +1 -1
  130. package/dist/react-native/operations/services.js +10 -27
  131. package/dist/react-native/operations/services.js.map +1 -1
  132. package/dist/react-native/operations/supportTickets.js +34 -46
  133. package/dist/react-native/operations/supportTickets.js.map +1 -1
  134. package/dist/react-native/operations/supportTicketsNoSubscription.js +34 -46
  135. package/dist/react-native/operations/supportTicketsNoSubscription.js.map +1 -1
  136. package/dist/react-native/pagingHelper.js +2 -4
  137. package/dist/react-native/pagingHelper.js.map +1 -1
  138. package/package.json +2 -2
  139. package/review/arm-support-node.api.md +889 -889
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/operations/files.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgBtD,4CAA4C;AAC5C,yCAAyC;AACzC,MAAa,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,iBAAyB,EACzB,OAAiC;QAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACnE,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,iBAAyB,EACzB,OAAiC,EACjC,QAAuB;;YAEvB,IAAI,MAAyB,CAAC;YAC9B,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC;YACpD,IAAI,CAAC,iBAAiB,EA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,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Files } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n FileDetails,\n FilesListNextOptionalParams,\n FilesListOptionalParams,\n FilesListResponse,\n FilesGetOptionalParams,\n FilesGetResponse,\n FilesCreateOptionalParams,\n FilesCreateResponse,\n UploadFile,\n FilesUploadOptionalParams,\n FilesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Files operations. */\nexport class FilesImpl implements Files {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Files class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n public list(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): PagedAsyncIterableIterator<FileDetails> {\n const iter = this.listPagingAll(fileWorkspaceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(fileWorkspaceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FileDetails[]> {\n let result: FilesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(fileWorkspaceName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n fileWorkspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): AsyncIterableIterator<FileDetails> {\n for await (const page of this.listPagingPage(fileWorkspaceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n private _list(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): Promise<FilesListResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Returns details of a specific file in a work space.\n * @param fileWorkspaceName File Workspace Name\n * @param fileName File Name\n * @param options The options parameters.\n */\n get(\n fileWorkspaceName: string,\n fileName: string,\n options?: FilesGetOptionalParams,\n ): Promise<FilesGetResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new file under a workspace for the specified subscription.\n * @param fileWorkspaceName File workspace name.\n * @param fileName File name.\n * @param createFileParameters Create file object\n * @param options The options parameters.\n */\n create(\n fileWorkspaceName: string,\n fileName: string,\n createFileParameters: FileDetails,\n options?: FilesCreateOptionalParams,\n ): Promise<FilesCreateResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, createFileParameters, options },\n createOperationSpec,\n );\n }\n\n /**\n * This API allows you to upload content to a file\n * @param fileWorkspaceName File WorkspaceName\n * @param fileName File Name\n * @param uploadFile UploadFile object\n * @param options The options parameters.\n */\n upload(\n fileWorkspaceName: string,\n fileName: string,\n uploadFile: UploadFile,\n options?: FilesUploadOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, uploadFile, options },\n uploadOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param fileWorkspaceName File Workspace Name\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n fileWorkspaceName: string,\n nextLink: string,\n options?: FilesListNextOptionalParams,\n ): Promise<FilesListNextResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createFileParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName1,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst uploadOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.uploadFile,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/operations/files.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgBtD,4CAA4C;AAC5C,yCAAyC;AACzC,MAAa,SAAS;IACH,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,iBAAyB,EACzB,OAAiC;QAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC,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AAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,wHAAwH;IAC9H,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Files } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n FileDetails,\n FilesListNextOptionalParams,\n FilesListOptionalParams,\n FilesListResponse,\n FilesGetOptionalParams,\n FilesGetResponse,\n FilesCreateOptionalParams,\n FilesCreateResponse,\n UploadFile,\n FilesUploadOptionalParams,\n FilesListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Files operations. */\nexport class FilesImpl implements Files {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Files class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n public list(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): PagedAsyncIterableIterator<FileDetails> {\n const iter = this.listPagingAll(fileWorkspaceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(fileWorkspaceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FileDetails[]> {\n let result: FilesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(fileWorkspaceName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n fileWorkspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): AsyncIterableIterator<FileDetails> {\n for await (const page of this.listPagingPage(fileWorkspaceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n private _list(\n fileWorkspaceName: string,\n options?: FilesListOptionalParams,\n ): Promise<FilesListResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Returns details of a specific file in a work space.\n * @param fileWorkspaceName File Workspace Name\n * @param fileName File Name\n * @param options The options parameters.\n */\n get(\n fileWorkspaceName: string,\n fileName: string,\n options?: FilesGetOptionalParams,\n ): Promise<FilesGetResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new file under a workspace for the specified subscription.\n * @param fileWorkspaceName File workspace name.\n * @param fileName File name.\n * @param createFileParameters Create file object\n * @param options The options parameters.\n */\n create(\n fileWorkspaceName: string,\n fileName: string,\n createFileParameters: FileDetails,\n options?: FilesCreateOptionalParams,\n ): Promise<FilesCreateResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, createFileParameters, options },\n createOperationSpec,\n );\n }\n\n /**\n * This API allows you to upload content to a file\n * @param fileWorkspaceName File WorkspaceName\n * @param fileName File Name\n * @param uploadFile UploadFile object\n * @param options The options parameters.\n */\n upload(\n fileWorkspaceName: string,\n fileName: string,\n uploadFile: UploadFile,\n options?: FilesUploadOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, uploadFile, options },\n uploadOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param fileWorkspaceName File Workspace Name\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n fileWorkspaceName: string,\n nextLink: string,\n options?: FilesListNextOptionalParams,\n ): Promise<FilesListNextResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createFileParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName1,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst uploadOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.uploadFile,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
16
16
  /// <reference lib="esnext.asynciterable" />
17
17
  /** Class containing FilesNoSubscription operations. */
18
18
  class FilesNoSubscriptionImpl {
19
+ client;
19
20
  /**
20
21
  * Initialize a new instance of the class FilesNoSubscription class.
21
22
  * @param client Reference to the service client
@@ -38,52 +39,35 @@ class FilesNoSubscriptionImpl {
38
39
  return this;
39
40
  },
40
41
  byPage: (settings) => {
41
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
42
43
  throw new Error("maxPageSize is not supported by this operation.");
43
44
  }
44
45
  return this.listPagingPage(fileWorkspaceName, options, settings);
45
46
  },
46
47
  };
47
48
  }
48
- listPagingPage(fileWorkspaceName, options, settings) {
49
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
50
- let result;
51
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
52
- if (!continuationToken) {
53
- result = yield tslib_1.__await(this._list(fileWorkspaceName, options));
54
- let page = result.value || [];
55
- continuationToken = result.nextLink;
56
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
- yield yield tslib_1.__await(page);
58
- }
59
- while (continuationToken) {
60
- result = yield tslib_1.__await(this._listNext(fileWorkspaceName, continuationToken, options));
61
- continuationToken = result.nextLink;
62
- let page = result.value || [];
63
- (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
- yield yield tslib_1.__await(page);
65
- }
66
- });
49
+ async *listPagingPage(fileWorkspaceName, options, settings) {
50
+ let result;
51
+ let continuationToken = settings?.continuationToken;
52
+ if (!continuationToken) {
53
+ result = await this._list(fileWorkspaceName, options);
54
+ let page = result.value || [];
55
+ continuationToken = result.nextLink;
56
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
57
+ yield page;
58
+ }
59
+ while (continuationToken) {
60
+ result = await this._listNext(fileWorkspaceName, continuationToken, options);
61
+ continuationToken = result.nextLink;
62
+ let page = result.value || [];
63
+ (0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
64
+ yield page;
65
+ }
67
66
  }
68
- listPagingAll(fileWorkspaceName, options) {
69
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
70
- var _a, e_1, _b, _c;
71
- try {
72
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(fileWorkspaceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
73
- _c = _f.value;
74
- _d = false;
75
- const page = _c;
76
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
77
- }
78
- }
79
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
80
- finally {
81
- try {
82
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
83
- }
84
- finally { if (e_1) throw e_1.error; }
85
- }
86
- });
67
+ async *listPagingAll(fileWorkspaceName, options) {
68
+ for await (const page of this.listPagingPage(fileWorkspaceName, options)) {
69
+ yield* page;
70
+ }
87
71
  }
88
72
  /**
89
73
  * Lists all the Files information under a workspace for an Azure subscription.
@@ -1 +1 @@
1
- {"version":3,"file":"filesNoSubscription.js","s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,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FilesNoSubscription } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n FileDetails,\n FilesNoSubscriptionListNextOptionalParams,\n FilesNoSubscriptionListOptionalParams,\n FilesNoSubscriptionListResponse,\n FilesNoSubscriptionGetOptionalParams,\n FilesNoSubscriptionGetResponse,\n FilesNoSubscriptionCreateOptionalParams,\n FilesNoSubscriptionCreateResponse,\n UploadFile,\n FilesNoSubscriptionUploadOptionalParams,\n FilesNoSubscriptionListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FilesNoSubscription operations. */\nexport class FilesNoSubscriptionImpl implements FilesNoSubscription {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class FilesNoSubscription class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n public list(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): PagedAsyncIterableIterator<FileDetails> {\n const iter = this.listPagingAll(fileWorkspaceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(fileWorkspaceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FileDetails[]> {\n let result: FilesNoSubscriptionListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(fileWorkspaceName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n fileWorkspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): AsyncIterableIterator<FileDetails> {\n for await (const page of this.listPagingPage(fileWorkspaceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n private _list(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): Promise<FilesNoSubscriptionListResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Returns details of a specific file in a work space.\n * @param fileWorkspaceName File Workspace Name\n * @param fileName File Name\n * @param options The options parameters.\n */\n get(\n fileWorkspaceName: string,\n fileName: string,\n options?: FilesNoSubscriptionGetOptionalParams,\n ): Promise<FilesNoSubscriptionGetResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new file under a workspace.\n * @param fileWorkspaceName File workspace name.\n * @param fileName File name.\n * @param createFileParameters Create file object\n * @param options The options parameters.\n */\n create(\n fileWorkspaceName: string,\n fileName: string,\n createFileParameters: FileDetails,\n options?: FilesNoSubscriptionCreateOptionalParams,\n ): Promise<FilesNoSubscriptionCreateResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, createFileParameters, options },\n createOperationSpec,\n );\n }\n\n /**\n * This API allows you to upload content to a file\n * @param fileWorkspaceName File WorkspaceName\n * @param fileName File Name\n * @param uploadFile UploadFile object\n * @param options The options parameters.\n */\n upload(\n fileWorkspaceName: string,\n fileName: string,\n uploadFile: UploadFile,\n options?: FilesNoSubscriptionUploadOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, uploadFile, options },\n uploadOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param fileWorkspaceName File Workspace Name\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n fileWorkspaceName: string,\n nextLink: string,\n options?: FilesNoSubscriptionListNextOptionalParams,\n ): Promise<FilesNoSubscriptionListNextResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.fileWorkspaceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createFileParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName1,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst uploadOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.uploadFile,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"filesNoSubscription.js","sourceRoot":"","sources":["../../../src/operations/filesNoSubscription.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAa,uBAAuB;IACjB,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,IAAI,CACT,iBAAyB,EACzB,OAA+C;QAE/C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACnE,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,iBAAyB,EACzB,OAA+C,EAC/C,QAAuB;QAEvB,IAAI,MAAuC,CAAC;QAC5C,IAAI,iBAAiB,GAAG,QAAQ,EAAE,iBAAiB,CAAC;QAC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AAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { FilesNoSubscription } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n FileDetails,\n FilesNoSubscriptionListNextOptionalParams,\n FilesNoSubscriptionListOptionalParams,\n FilesNoSubscriptionListResponse,\n FilesNoSubscriptionGetOptionalParams,\n FilesNoSubscriptionGetResponse,\n FilesNoSubscriptionCreateOptionalParams,\n FilesNoSubscriptionCreateResponse,\n UploadFile,\n FilesNoSubscriptionUploadOptionalParams,\n FilesNoSubscriptionListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing FilesNoSubscription operations. */\nexport class FilesNoSubscriptionImpl implements FilesNoSubscription {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class FilesNoSubscription class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n public list(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): PagedAsyncIterableIterator<FileDetails> {\n const iter = this.listPagingAll(fileWorkspaceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(fileWorkspaceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<FileDetails[]> {\n let result: FilesNoSubscriptionListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(fileWorkspaceName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n fileWorkspaceName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): AsyncIterableIterator<FileDetails> {\n for await (const page of this.listPagingPage(fileWorkspaceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Files information under a workspace for an Azure subscription.\n * @param fileWorkspaceName File Workspace Name\n * @param options The options parameters.\n */\n private _list(\n fileWorkspaceName: string,\n options?: FilesNoSubscriptionListOptionalParams,\n ): Promise<FilesNoSubscriptionListResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Returns details of a specific file in a work space.\n * @param fileWorkspaceName File Workspace Name\n * @param fileName File Name\n * @param options The options parameters.\n */\n get(\n fileWorkspaceName: string,\n fileName: string,\n options?: FilesNoSubscriptionGetOptionalParams,\n ): Promise<FilesNoSubscriptionGetResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new file under a workspace.\n * @param fileWorkspaceName File workspace name.\n * @param fileName File name.\n * @param createFileParameters Create file object\n * @param options The options parameters.\n */\n create(\n fileWorkspaceName: string,\n fileName: string,\n createFileParameters: FileDetails,\n options?: FilesNoSubscriptionCreateOptionalParams,\n ): Promise<FilesNoSubscriptionCreateResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, createFileParameters, options },\n createOperationSpec,\n );\n }\n\n /**\n * This API allows you to upload content to a file\n * @param fileWorkspaceName File WorkspaceName\n * @param fileName File Name\n * @param uploadFile UploadFile object\n * @param options The options parameters.\n */\n upload(\n fileWorkspaceName: string,\n fileName: string,\n uploadFile: UploadFile,\n options?: FilesNoSubscriptionUploadOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, fileName, uploadFile, options },\n uploadOperationSpec,\n );\n }\n\n /**\n * ListNext\n * @param fileWorkspaceName File Workspace Name\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n fileWorkspaceName: string,\n nextLink: string,\n options?: FilesNoSubscriptionListNextOptionalParams,\n ): Promise<FilesNoSubscriptionListNextResponse> {\n return this.client.sendOperationRequest(\n { fileWorkspaceName, nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.fileWorkspaceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.FileDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createFileParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName1,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst uploadOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/fileWorkspaces/{fileWorkspaceName}/files/{fileName}/upload\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.uploadFile,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.fileWorkspaceName,\n Parameters.fileName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.FilesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.fileWorkspaceName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing Operations operations. */
17
17
  class OperationsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Operations class.
20
21
  * @param client Reference to the service client
@@ -36,39 +37,22 @@ class OperationsImpl {
36
37
  return this;
37
38
  },
38
39
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
40
41
  throw new Error("maxPageSize is not supported by this operation.");
41
42
  }
42
43
  return this.listPagingPage(options, settings);
43
44
  },
44
45
  };
45
46
  }
46
- listPagingPage(options, _settings) {
47
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
48
- let result;
49
- result = yield tslib_1.__await(this._list(options));
50
- yield yield tslib_1.__await(result.value || []);
51
- });
47
+ async *listPagingPage(options, _settings) {
48
+ let result;
49
+ result = await this._list(options);
50
+ yield result.value || [];
52
51
  }
53
- listPagingAll(options) {
54
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
55
- var _a, e_1, _b, _c;
56
- try {
57
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
58
- _c = _f.value;
59
- _d = false;
60
- const page = _c;
61
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
62
- }
63
- }
64
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
65
- finally {
66
- try {
67
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
68
- }
69
- finally { if (e_1) throw e_1.error; }
70
- }
71
- });
52
+ async *listPagingAll(options) {
53
+ for await (const page of this.listPagingPage(options)) {
54
+ yield* page;
55
+ }
72
56
  }
73
57
  /**
74
58
  * This lists all the available Microsoft Support REST API operations.
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAAsC,EACtC,SAAwB;;YAExB,IAAI,MAA8B,CAAC;YACnC,MAAM,GAAG,sBAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;YACnC,4BAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;QAC3B,CAAC;KAAA;IAEc,aAAa,CAC1B,OAAsC;;;;gBAEtC,KAAyB,eAAA,KAAA,sBAAA,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA,IAAA,uEAAE,CAAC;oBAA/B,cAA4B;oBAA5B,WAA4B;oBAA1C,MAAM,IAAI,KAAA,CAAA;oBACnB,sBAAA,KAAK,CAAC,CAAC,yBAAA,sBAAA,IAAI,CAAA,CAAA,CAAA,CAAC;gBACd,CAAC;;;;;;;;;QACH,CAAC;KAAA;IAED;;;OAGG;IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AA7DD,wCA6DC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,yCAAyC;IAC/C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * This lists all the available Microsoft Support REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * This lists all the available Microsoft Support REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAa,cAAc;IACR,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAsC,EACtC,SAAwB;QAExB,IAAI,MAA8B,CAAC;QACnC,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,CAAC,aAAa,CAC1B,OAAsC;QAEtC,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACtD,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CACX,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AA7DD,wCA6DC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,yCAAyC;IAC/C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * This lists all the available Microsoft Support REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * This lists all the available Microsoft Support REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing ProblemClassifications operations. */
17
17
  class ProblemClassificationsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class ProblemClassifications class.
20
21
  * @param client Reference to the service client
@@ -40,39 +41,22 @@ class ProblemClassificationsImpl {
40
41
  return this;
41
42
  },
42
43
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
44
+ if (settings?.maxPageSize) {
44
45
  throw new Error("maxPageSize is not supported by this operation.");
45
46
  }
46
47
  return this.listPagingPage(serviceName, options, settings);
47
48
  },
48
49
  };
49
50
  }
50
- listPagingPage(serviceName, options, _settings) {
51
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- result = yield tslib_1.__await(this._list(serviceName, options));
54
- yield yield tslib_1.__await(result.value || []);
55
- });
51
+ async *listPagingPage(serviceName, options, _settings) {
52
+ let result;
53
+ result = await this._list(serviceName, options);
54
+ yield result.value || [];
56
55
  }
57
- listPagingAll(serviceName, options) {
58
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
59
- var _a, e_1, _b, _c;
60
- try {
61
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(serviceName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
62
- _c = _f.value;
63
- _d = false;
64
- const page = _c;
65
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
66
- }
67
- }
68
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
69
- finally {
70
- try {
71
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
72
- }
73
- finally { if (e_1) throw e_1.error; }
74
- }
75
- });
56
+ async *listPagingAll(serviceName, options) {
57
+ for await (const page of this.listPagingPage(serviceName, options)) {
58
+ yield* page;
59
+ }
76
60
  }
77
61
  /**
78
62
  * Lists all the problem classifications (categories) available for a specific Azure service. Always
@@ -1 +1 @@
1
- {"version":3,"file":"problemClassifications.js","sourceRoot":"","sources":["../../../src/operations/problemClassifications.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IAGr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CAAC,WAAW;QACtB,UAAU,CAAC,yBAAyB;KACrC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ProblemClassifications } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n ProblemClassification,\n ProblemClassificationsListOptionalParams,\n ProblemClassificationsListResponse,\n ProblemClassificationsGetOptionalParams,\n ProblemClassificationsGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProblemClassifications operations. */\nexport class ProblemClassificationsImpl implements ProblemClassifications {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class ProblemClassifications class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n public list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): PagedAsyncIterableIterator<ProblemClassification> {\n const iter = this.listPagingAll(serviceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(serviceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ProblemClassification[]> {\n let result: ProblemClassificationsListResponse;\n result = await this._list(serviceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): AsyncIterableIterator<ProblemClassification> {\n for await (const page of this.listPagingPage(serviceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n private _list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): Promise<ProblemClassificationsListResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get problem classification details for a specific Azure service.\n * @param serviceName Name of the Azure service available for support.\n * @param problemClassificationName Name of problem classification.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n problemClassificationName: string,\n options?: ProblemClassificationsGetOptionalParams,\n ): Promise<ProblemClassificationsGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, problemClassificationName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassificationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassification,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.serviceName,\n Parameters.problemClassificationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"problemClassifications.js","sourceRoot":"","sources":["../../../src/operations/problemClassifications.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,0DAA0D;AAC1D,MAAa,0BAA0B;IACpB,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,WAAmB,EACnB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC7D,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,WAAmB,EACnB,OAAkD,EAClD,SAAwB;QAExB,IAAI,MAA0C,CAAC;QAC/C,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAChD,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wGAAwG;IAC9G,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,yBAAyB;KACrC;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ProblemClassifications } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n ProblemClassification,\n ProblemClassificationsListOptionalParams,\n ProblemClassificationsListResponse,\n ProblemClassificationsGetOptionalParams,\n ProblemClassificationsGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProblemClassifications operations. */\nexport class ProblemClassificationsImpl implements ProblemClassifications {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class ProblemClassifications class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n public list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): PagedAsyncIterableIterator<ProblemClassification> {\n const iter = this.listPagingAll(serviceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(serviceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ProblemClassification[]> {\n let result: ProblemClassificationsListResponse;\n result = await this._list(serviceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): AsyncIterableIterator<ProblemClassification> {\n for await (const page of this.listPagingPage(serviceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n private _list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): Promise<ProblemClassificationsListResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get problem classification details for a specific Azure service.\n * @param serviceName Name of the Azure service available for support.\n * @param problemClassificationName Name of problem classification.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n problemClassificationName: string,\n options?: ProblemClassificationsGetOptionalParams,\n ): Promise<ProblemClassificationsGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, problemClassificationName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassificationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassification,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.serviceName,\n Parameters.problemClassificationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing Services operations. */
17
17
  class ServicesImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Services class.
20
21
  * @param client Reference to the service client
@@ -42,39 +43,22 @@ class ServicesImpl {
42
43
  return this;
43
44
  },
44
45
  byPage: (settings) => {
45
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
46
+ if (settings?.maxPageSize) {
46
47
  throw new Error("maxPageSize is not supported by this operation.");
47
48
  }
48
49
  return this.listPagingPage(options, settings);
49
50
  },
50
51
  };
51
52
  }
52
- listPagingPage(options, _settings) {
53
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingPage_1() {
54
- let result;
55
- result = yield tslib_1.__await(this._list(options));
56
- yield yield tslib_1.__await(result.value || []);
57
- });
53
+ async *listPagingPage(options, _settings) {
54
+ let result;
55
+ result = await this._list(options);
56
+ yield result.value || [];
58
57
  }
59
- listPagingAll(options) {
60
- return tslib_1.__asyncGenerator(this, arguments, function* listPagingAll_1() {
61
- var _a, e_1, _b, _c;
62
- try {
63
- for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
64
- _c = _f.value;
65
- _d = false;
66
- const page = _c;
67
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
68
- }
69
- }
70
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
71
- finally {
72
- try {
73
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
74
- }
75
- finally { if (e_1) throw e_1.error; }
76
- }
77
- });
58
+ async *listPagingAll(options) {
59
+ for await (const page of this.listPagingPage(options)) {
60
+ yield* page;
61
+ }
78
62
  }
79
63
  /**
80
64
  * Lists all the Azure services available for support ticket creation. For **Technical** issues, select
@@ -1 +1 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/operations/services.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,C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ACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,qDAAqD;IAC3D,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Services } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Service,\n ServicesListOptionalParams,\n ServicesListResponse,\n ServicesGetOptionalParams,\n ServicesGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Services operations. */\nexport class ServicesImpl implements Services {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Services class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n public list(\n options?: ServicesListOptionalParams,\n ): PagedAsyncIterableIterator<Service> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: ServicesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Service[]> {\n let result: ServicesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: ServicesListOptionalParams,\n ): AsyncIterableIterator<Service> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n private _list(\n options?: ServicesListOptionalParams,\n ): Promise<ServicesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets a specific Azure service for support ticket creation.\n * @param serviceName Name of the Azure service.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n options?: ServicesGetOptionalParams,\n ): Promise<ServicesGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Service,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/operations/services.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,4CAA4C;AAC5C,MAAa,YAAY;IACN,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAA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,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,qDAAqD;IAC3D,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,OAAO;SAC5B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Services } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Service,\n ServicesListOptionalParams,\n ServicesListResponse,\n ServicesGetOptionalParams,\n ServicesGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Services operations. */\nexport class ServicesImpl implements Services {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Services class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n public list(\n options?: ServicesListOptionalParams,\n ): PagedAsyncIterableIterator<Service> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: ServicesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Service[]> {\n let result: ServicesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: ServicesListOptionalParams,\n ): AsyncIterableIterator<Service> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n private _list(\n options?: ServicesListOptionalParams,\n ): Promise<ServicesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets a specific Azure service for support ticket creation.\n * @param serviceName Name of the Azure service.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n options?: ServicesGetOptionalParams,\n ): Promise<ServicesGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Service,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}