aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py')
-rw-r--r--.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py
new file mode 100644
index 00000000..58b96a1b
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/entities/_assets/intellectual_property.py
@@ -0,0 +1,49 @@
+# ---------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# ---------------------------------------------------------
+
+from typing import Any, Optional
+
+from azure.ai.ml._restclient.v2023_04_01_preview.models import IntellectualProperty as RestIntellectualProperty
+from azure.ai.ml._utils._experimental import experimental
+from azure.ai.ml.constants._assets import IPProtectionLevel
+from azure.ai.ml.entities._mixins import RestTranslatableMixin
+
+
+@experimental
+class IntellectualProperty(RestTranslatableMixin):
+ """Intellectual property settings definition.
+
+ :keyword publisher: The publisher's name.
+ :paramtype publisher: Optional[str]
+ :keyword protection_level: Asset Protection Level. Accepted values are IPProtectionLevel.ALL ("all") and
+ IPProtectionLevel.NONE ("none"). Defaults to IPProtectionLevel.ALL ("all").
+ :paramtype protection_level: Optional[Union[str, ~azure.ai.ml.constants.IPProtectionLevel]]
+
+ .. admonition:: Example:
+
+ .. literalinclude:: ../samples/ml_samples_misc.py
+ :start-after: [START intellectual_property_configuration]
+ :end-before: [END intellectual_property_configuration]
+ :language: python
+ :dedent: 8
+ :caption: Configuring intellectual property settings on a CommandComponent.
+ """
+
+ def __init__(
+ self, *, publisher: Optional[str] = None, protection_level: IPProtectionLevel = IPProtectionLevel.ALL
+ ) -> None:
+ self.publisher = publisher
+ self.protection_level = protection_level
+
+ def _to_rest_object(self) -> RestIntellectualProperty:
+ return RestIntellectualProperty(publisher=self.publisher, protection_level=self.protection_level)
+
+ @classmethod
+ def _from_rest_object(cls, obj: RestIntellectualProperty) -> "IntellectualProperty":
+ return cls(publisher=obj.publisher, protection_level=obj.protection_level)
+
+ def __eq__(self, other: Any) -> bool:
+ if not isinstance(other, IntellectualProperty):
+ return NotImplemented
+ return self.publisher == other.publisher and self.protection_level == other.protection_level