# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=useless-super-delegation
import datetime
from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload
from .._utils.model_base import Model as _Model, rest_field
if TYPE_CHECKING:
from .. import models as _models
[docs]
class ErrorAdditionalInfo(_Model):
"""The resource management error additional info.
:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: any
"""
type: Optional[str] = rest_field(visibility=["read"])
"""The additional info type."""
info: Optional[Any] = rest_field(visibility=["read"])
"""The additional info."""
[docs]
class ErrorDetail(_Model):
"""The error detail.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~azure.mgmt.planetarycomputer.models.ErrorDetail]
:ivar additional_info: The error additional info.
:vartype additional_info: list[~azure.mgmt.planetarycomputer.models.ErrorAdditionalInfo]
"""
code: Optional[str] = rest_field(visibility=["read"])
"""The error code."""
message: Optional[str] = rest_field(visibility=["read"])
"""The error message."""
target: Optional[str] = rest_field(visibility=["read"])
"""The error target."""
details: Optional[List["_models.ErrorDetail"]] = rest_field(visibility=["read"])
"""The error details."""
additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = rest_field(
name="additionalInfo", visibility=["read"]
)
"""The error additional info."""
[docs]
class ErrorResponse(_Model):
"""Error response.
:ivar error: The error object.
:vartype error: ~azure.mgmt.planetarycomputer.models.ErrorDetail
"""
error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The error object."""
@overload
def __init__(
self,
*,
error: Optional["_models.ErrorDetail"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class Resource(_Model):
"""Resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
"Microsoft.Storage/storageAccounts".
:vartype type: str
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.planetarycomputer.models.SystemData
"""
id: Optional[str] = rest_field(visibility=["read"])
"""Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}."""
name: Optional[str] = rest_field(visibility=["read"])
"""The name of the resource."""
type: Optional[str] = rest_field(visibility=["read"])
"""The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or
\"Microsoft.Storage/storageAccounts\"."""
system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"])
"""Azure Resource Manager metadata containing createdBy and modifiedBy information."""
[docs]
class TrackedResource(Resource):
"""Tracked Resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
"Microsoft.Storage/storageAccounts".
:vartype type: str
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.planetarycomputer.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
:ivar location: The geo-location where the resource lives. Required.
:vartype location: str
"""
tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Resource tags."""
location: str = rest_field(visibility=["read", "create"])
"""The geo-location where the resource lives. Required."""
@overload
def __init__(
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class GeoCatalog(TrackedResource):
"""A Microsoft Planetary Computer Pro GeoCatalog resource.
:ivar id: Fully qualified resource ID for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
:ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
"Microsoft.Storage/storageAccounts".
:vartype type: str
:ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
information.
:vartype system_data: ~azure.mgmt.planetarycomputer.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
:ivar location: The geo-location where the resource lives. Required.
:vartype location: str
:ivar properties: The resource-specific properties for this resource.
:vartype properties: ~azure.mgmt.planetarycomputer.models.GeoCatalogProperties
:ivar identity: The managed service identities assigned to this resource.
:vartype identity: ~azure.mgmt.planetarycomputer.models.ManagedServiceIdentity
"""
properties: Optional["_models.GeoCatalogProperties"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The resource-specific properties for this resource."""
identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The managed service identities assigned to this resource."""
@overload
def __init__(
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
properties: Optional["_models.GeoCatalogProperties"] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class GeoCatalogProperties(_Model):
"""The details of the Microsoft Planetary Computer Pro GeoCatalog.
:ivar tier: Tier of the catalog. This cannot be changed after the catalog is created. If not
provided, defaults to Basic. "Basic"
:vartype tier: str or ~azure.mgmt.planetarycomputer.models.CatalogTier
:ivar catalog_uri: The URI of the catalog management UI.
:vartype catalog_uri: str
:ivar provisioning_state: The status of the last operation. Known values are: "Succeeded",
"Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted".
:vartype provisioning_state: str or ~azure.mgmt.planetarycomputer.models.ProvisioningState
:ivar auto_generated_domain_name_label_scope: The scope of the auto-generated domain name
label. If not provided, defaults to TenantReuse. Known values are: "NoReuse", "TenantReuse",
"SubscriptionReuse", and "ResourceGroupReuse".
:vartype auto_generated_domain_name_label_scope: str or
~azure.mgmt.planetarycomputer.models.AutoGeneratedDomainNameLabelScope
"""
tier: Optional[Union[str, "_models.CatalogTier"]] = rest_field(visibility=["read", "create"])
"""Tier of the catalog. This cannot be changed after the catalog is created. If not provided,
defaults to Basic. \"Basic\""""
catalog_uri: Optional[str] = rest_field(name="catalogUri", visibility=["read"])
"""The URI of the catalog management UI."""
provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field(
name="provisioningState", visibility=["read"]
)
"""The status of the last operation. Known values are: \"Succeeded\", \"Failed\", \"Canceled\",
\"Provisioning\", \"Updating\", \"Deleting\", and \"Accepted\"."""
auto_generated_domain_name_label_scope: Optional[Union[str, "_models.AutoGeneratedDomainNameLabelScope"]] = (
rest_field(name="autoGeneratedDomainNameLabelScope", visibility=["read", "create"])
)
"""The scope of the auto-generated domain name label. If not provided, defaults to TenantReuse.
Known values are: \"NoReuse\", \"TenantReuse\", \"SubscriptionReuse\", and
\"ResourceGroupReuse\"."""
@overload
def __init__(
self,
*,
tier: Optional[Union[str, "_models.CatalogTier"]] = None,
auto_generated_domain_name_label_scope: Optional[
Union[str, "_models.AutoGeneratedDomainNameLabelScope"]
] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class GeoCatalogUpdate(_Model):
"""The properties of a GeoCatalog that can be updated.
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
:ivar identity: The managed service identity properties to update.
:vartype identity: ~azure.mgmt.planetarycomputer.models.ManagedServiceIdentityUpdate
"""
tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Resource tags."""
identity: Optional["_models.ManagedServiceIdentityUpdate"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The managed service identity properties to update."""
@overload
def __init__(
self,
*,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentityUpdate"] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class ManagedServiceIdentity(_Model):
"""Managed service identity (system assigned and/or user assigned identities).
:ivar principal_id: The service principal ID of the system assigned identity. This property
will only be provided for a system assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of the system assigned identity. This property will only be
provided for a system assigned identity.
:vartype tenant_id: str
:ivar type: The type of managed identity assigned to this resource. Required. Known values are:
"None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
:vartype type: str or ~azure.mgmt.planetarycomputer.models.ManagedServiceIdentityType
:ivar user_assigned_identities: The identities assigned to this resource by the user.
:vartype user_assigned_identities: dict[str,
~azure.mgmt.planetarycomputer.models.UserAssignedIdentity]
"""
principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
"""The service principal ID of the system assigned identity. This property will only be provided
for a system assigned identity."""
tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"])
"""The tenant ID of the system assigned identity. This property will only be provided for a system
assigned identity."""
type: Union[str, "_models.ManagedServiceIdentityType"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The type of managed identity assigned to this resource. Required. Known values are: \"None\",
\"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\"."""
user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = rest_field(
name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
)
"""The identities assigned to this resource by the user."""
@overload
def __init__(
self,
*,
type: Union[str, "_models.ManagedServiceIdentityType"],
user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class ManagedServiceIdentityUpdate(_Model):
"""The template for adding optional properties.
:ivar type: The type of managed identity assigned to this resource. Known values are: "None",
"SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned".
:vartype type: str or ~azure.mgmt.planetarycomputer.models.ManagedServiceIdentityType
:ivar user_assigned_identities: The identities assigned to this resource by the user.
:vartype user_assigned_identities: dict[str,
~azure.mgmt.planetarycomputer.models.UserAssignedIdentity]
"""
type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The type of managed identity assigned to this resource. Known values are: \"None\",
\"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\"."""
user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = rest_field(
name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"]
)
"""The identities assigned to this resource by the user."""
@overload
def __init__(
self,
*,
type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = None,
user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class SystemData(_Model):
"""Metadata pertaining to creation and last modification of the resource.
:ivar created_by: The identity that created the resource.
:vartype created_by: str
:ivar created_by_type: The type of identity that created the resource. Known values are:
"User", "Application", "ManagedIdentity", and "Key".
:vartype created_by_type: str or ~azure.mgmt.planetarycomputer.models.CreatedByType
:ivar created_at: The timestamp of resource creation (UTC).
:vartype created_at: ~datetime.datetime
:ivar last_modified_by: The identity that last modified the resource.
:vartype last_modified_by: str
:ivar last_modified_by_type: The type of identity that last modified the resource. Known values
are: "User", "Application", "ManagedIdentity", and "Key".
:vartype last_modified_by_type: str or ~azure.mgmt.planetarycomputer.models.CreatedByType
:ivar last_modified_at: The timestamp of resource last modification (UTC).
:vartype last_modified_at: ~datetime.datetime
"""
created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"])
"""The identity that created the resource."""
created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
name="createdByType", visibility=["read", "create", "update", "delete", "query"]
)
"""The type of identity that created the resource. Known values are: \"User\", \"Application\",
\"ManagedIdentity\", and \"Key\"."""
created_at: Optional[datetime.datetime] = rest_field(
name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""The timestamp of resource creation (UTC)."""
last_modified_by: Optional[str] = rest_field(
name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"]
)
"""The identity that last modified the resource."""
last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(
name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"]
)
"""The type of identity that last modified the resource. Known values are: \"User\",
\"Application\", \"ManagedIdentity\", and \"Key\"."""
last_modified_at: Optional[datetime.datetime] = rest_field(
name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339"
)
"""The timestamp of resource last modification (UTC)."""
@overload
def __init__(
self,
*,
created_by: Optional[str] = None,
created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
created_at: Optional[datetime.datetime] = None,
last_modified_by: Optional[str] = None,
last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
last_modified_at: Optional[datetime.datetime] = None,
) -> None: ...
@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
[docs]
class UserAssignedIdentity(_Model):
"""User assigned identity properties.
:ivar principal_id: The principal ID of the assigned identity.
:vartype principal_id: str
:ivar client_id: The client ID of the assigned identity.
:vartype client_id: str
"""
principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"])
"""The principal ID of the assigned identity."""
client_id: Optional[str] = rest_field(name="clientId", visibility=["read"])
"""The client ID of the assigned identity."""