@forge/util

2.0.12.0.1-experimental-7890858
packages/ari/chunk-JPMIUCXC.mjs
+packages/ari/chunk-JPMIUCXC.mjsNew file
+67
Index: package/packages/ari/chunk-JPMIUCXC.mjs
===================================================================
--- package/packages/ari/chunk-JPMIUCXC.mjs
+++ package/packages/ari/chunk-JPMIUCXC.mjs
@@ -0,0 +1,67 @@
+import {
+  GraphSoftwareServiceAriResourceOwner,
+  GraphSoftwareServiceAriResourceType
+} from "./chunk-Q2EHVXLV.mjs";
+import {
+  RegisteredAri
+} from "./chunk-AB4PPISI.mjs";
+import {
+  AriParser
+} from "./chunk-S7RIZVFI.mjs";
+
+// src/graph/software-service/manifest.ts
+var graphSoftwareServiceAriStaticOpts = {
+  qualifier: "ari",
+  platformQualifier: "cloud",
+  cloudId: new RegExp("^$"),
+  resourceOwner: GraphSoftwareServiceAriResourceOwner,
+  resourceType: GraphSoftwareServiceAriResourceType,
+  resourceIdSlug: "activation/{activationId}/{softwareServiceId}",
+  resourceIdSegmentFormats: {
+    activationId: /[a-zA-Z0-9\-]+/,
+    // eslint-disable-line no-useless-escape
+    softwareServiceId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/
+  }
+};
+
+// src/graph/software-service/index.ts
+var GraphSoftwareServiceAri = class _GraphSoftwareServiceAri extends RegisteredAri {
+  constructor(opts) {
+    super(opts), this._activationId = opts.resourceIdSegmentValues.activationId, this._softwareServiceId = opts.resourceIdSegmentValues.softwareServiceId;
+  }
+  get activationId() {
+    return this._activationId;
+  }
+  get softwareServiceId() {
+    return this._softwareServiceId;
+  }
+  static create(opts) {
+    let derivedOpts = {
+      qualifier: graphSoftwareServiceAriStaticOpts.qualifier,
+      platformQualifier: graphSoftwareServiceAriStaticOpts.platformQualifier,
+      cloudId: void 0,
+      resourceOwner: graphSoftwareServiceAriStaticOpts.resourceOwner,
+      resourceType: graphSoftwareServiceAriStaticOpts.resourceType,
+      resourceId: `activation/${opts.activationId}/${opts.softwareServiceId}`,
+      resourceIdSegmentValues: {
+        activationId: opts.activationId,
+        softwareServiceId: opts.softwareServiceId
+      }
+    }, ariOpts = AriParser.fromOpts(derivedOpts, graphSoftwareServiceAriStaticOpts);
+    return new _GraphSoftwareServiceAri(ariOpts);
+  }
+  static parse(maybeAri) {
+    let opts = AriParser.fromString(maybeAri, graphSoftwareServiceAriStaticOpts);
+    return new _GraphSoftwareServiceAri(opts);
+  }
+  getVariables() {
+    return {
+      activationId: this.activationId,
+      softwareServiceId: this.softwareServiceId
+    };
+  }
+};
+
+export {
+  GraphSoftwareServiceAri
+};