Skip to content

Commit

Permalink
CodeGen from PR 12690 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 01fba4d8130d2f56a15266e20e56ca102c0b7686 into c7358a0
  • Loading branch information
SDKAuto committed Jan 31, 2021
1 parent 599d3b8 commit be6e3ef
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from ._models_py3 import NetworkRuleSet
from ._models_py3 import OperationDefinition
from ._models_py3 import OperationDisplayDefinition
from ._models_py3 import OperationLogSpecificationDefinition
from ._models_py3 import OperationMetricSpecificationDefinition
from ._models_py3 import OperationServiceSpecificationDefinition
from ._models_py3 import OverrideTaskStepProperties
Expand Down Expand Up @@ -192,6 +193,7 @@
from ._models import NetworkRuleSet
from ._models import OperationDefinition
from ._models import OperationDisplayDefinition
from ._models import OperationLogSpecificationDefinition
from ._models import OperationMetricSpecificationDefinition
from ._models import OperationServiceSpecificationDefinition
from ._models import OverrideTaskStepProperties
Expand Down Expand Up @@ -310,6 +312,7 @@
TrustPolicyType,
EncryptionStatus,
PublicNetworkAccess,
NetworkRuleBypassOptions,
PasswordName,
RegistryUsageUnit,
WebhookStatus,
Expand Down Expand Up @@ -384,6 +387,7 @@
'NetworkRuleSet',
'OperationDefinition',
'OperationDisplayDefinition',
'OperationLogSpecificationDefinition',
'OperationMetricSpecificationDefinition',
'OperationServiceSpecificationDefinition',
'OverrideTaskStepProperties',
Expand Down Expand Up @@ -501,6 +505,7 @@
'TrustPolicyType',
'EncryptionStatus',
'PublicNetworkAccess',
'NetworkRuleBypassOptions',
'PasswordName',
'RegistryUsageUnit',
'WebhookStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ class PublicNetworkAccess(str, Enum):
disabled = "Disabled"


class NetworkRuleBypassOptions(str, Enum):

azure_services = "AzureServices"
none = "None"


class PasswordName(str, Enum):

password = "password"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,30 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class OperationLogSpecificationDefinition(Model):
"""The definition of Azure Monitoring log.
:param name: Log name.
:type name: str
:param display_name: Log display name.
:type display_name: str
:param blob_duration: Log blob duration.
:type blob_duration: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'blob_duration': {'key': 'blobDuration', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationLogSpecificationDefinition, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display_name = kwargs.get('display_name', None)
self.blob_duration = kwargs.get('blob_duration', None)


class OperationMetricSpecificationDefinition(Model):
"""The definition of Azure Monitoring metric.
Expand Down Expand Up @@ -2274,15 +2298,20 @@ class OperationServiceSpecificationDefinition(Model):
definition.
:type metric_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition]
:param log_specifications: A list of Azure Monitoring log definitions.
:type log_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition]
"""

_attribute_map = {
'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'},
'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'},
}

def __init__(self, **kwargs):
super(OperationServiceSpecificationDefinition, self).__init__(**kwargs)
self.metric_specifications = kwargs.get('metric_specifications', None)
self.log_specifications = kwargs.get('log_specifications', None)


class OverrideTaskStepProperties(Model):
Expand Down Expand Up @@ -2979,6 +3008,11 @@ class Registry(Resource):
'Disabled'. Default value: "Enabled" .
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_validation = {
Expand Down Expand Up @@ -3018,6 +3052,7 @@ class Registry(Resource):
'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -3037,6 +3072,7 @@ def __init__(self, **kwargs):
self.data_endpoint_host_names = None
self.private_endpoint_connections = None
self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices")


class RegistryListCredentialsResult(Model):
Expand Down Expand Up @@ -3145,13 +3181,13 @@ def __init__(self, **kwargs):
class RegistryUpdateParameters(Model):
"""The parameters for updating a container registry.
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param tags: The tags for the container registry.
:type tags: dict[str, str]
:param sku: The SKU of the container registry.
:type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param admin_user_enabled: The value that indicates whether the admin user
is enabled.
:type admin_user_enabled: bool
Expand All @@ -3172,31 +3208,38 @@ class RegistryUpdateParameters(Model):
'Disabled'
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_attribute_map = {
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
'policies': {'key': 'properties.policies', 'type': 'Policies'},
'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RegistryUpdateParameters, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.tags = kwargs.get('tags', None)
self.sku = kwargs.get('sku', None)
self.identity = kwargs.get('identity', None)
self.admin_user_enabled = kwargs.get('admin_user_enabled', None)
self.network_rule_set = kwargs.get('network_rule_set', None)
self.policies = kwargs.get('policies', None)
self.encryption = kwargs.get('encryption', None)
self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None)
self.public_network_access = kwargs.get('public_network_access', None)
self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices")


class RegistryUsage(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,30 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non
self.description = description


class OperationLogSpecificationDefinition(Model):
"""The definition of Azure Monitoring log.
:param name: Log name.
:type name: str
:param display_name: Log display name.
:type display_name: str
:param blob_duration: Log blob duration.
:type blob_duration: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'blob_duration': {'key': 'blobDuration', 'type': 'str'},
}

def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None:
super(OperationLogSpecificationDefinition, self).__init__(**kwargs)
self.name = name
self.display_name = display_name
self.blob_duration = blob_duration


class OperationMetricSpecificationDefinition(Model):
"""The definition of Azure Monitoring metric.
Expand Down Expand Up @@ -2274,15 +2298,20 @@ class OperationServiceSpecificationDefinition(Model):
definition.
:type metric_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition]
:param log_specifications: A list of Azure Monitoring log definitions.
:type log_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition]
"""

_attribute_map = {
'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'},
'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'},
}

def __init__(self, *, metric_specifications=None, **kwargs) -> None:
def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None:
super(OperationServiceSpecificationDefinition, self).__init__(**kwargs)
self.metric_specifications = metric_specifications
self.log_specifications = log_specifications


class OverrideTaskStepProperties(Model):
Expand Down Expand Up @@ -2979,6 +3008,11 @@ class Registry(Resource):
'Disabled'. Default value: "Enabled" .
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_validation = {
Expand Down Expand Up @@ -3018,9 +3052,10 @@ class Registry(Resource):
'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", **kwargs) -> None:
def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", network_rule_bypass_options="AzureServices", **kwargs) -> None:
super(Registry, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.identity = identity
Expand All @@ -3037,6 +3072,7 @@ def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_e
self.data_endpoint_host_names = None
self.private_endpoint_connections = None
self.public_network_access = public_network_access
self.network_rule_bypass_options = network_rule_bypass_options


class RegistryListCredentialsResult(Model):
Expand Down Expand Up @@ -3145,13 +3181,13 @@ def __init__(self, *, name=None, value: str=None, **kwargs) -> None:
class RegistryUpdateParameters(Model):
"""The parameters for updating a container registry.
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param tags: The tags for the container registry.
:type tags: dict[str, str]
:param sku: The SKU of the container registry.
:type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param admin_user_enabled: The value that indicates whether the admin user
is enabled.
:type admin_user_enabled: bool
Expand All @@ -3172,31 +3208,38 @@ class RegistryUpdateParameters(Model):
'Disabled'
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_attribute_map = {
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
'policies': {'key': 'properties.policies', 'type': 'Policies'},
'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, *, tags=None, sku=None, identity=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, **kwargs) -> None:
def __init__(self, *, identity=None, tags=None, sku=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, network_rule_bypass_options="AzureServices", **kwargs) -> None:
super(RegistryUpdateParameters, self).__init__(**kwargs)
self.identity = identity
self.tags = tags
self.sku = sku
self.identity = identity
self.admin_user_enabled = admin_user_enabled
self.network_rule_set = network_rule_set
self.policies = policies
self.encryption = encryption
self.data_endpoint_enabled = data_endpoint_enabled
self.public_network_access = public_network_access
self.network_rule_bypass_options = network_rule_bypass_options


class RegistryUsage(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@
from ._models_py3 import NetworkRuleSet
from ._models_py3 import OperationDefinition
from ._models_py3 import OperationDisplayDefinition
from ._models_py3 import OperationLogSpecificationDefinition
from ._models_py3 import OperationMetricSpecificationDefinition
from ._models_py3 import OperationServiceSpecificationDefinition
from ._models_py3 import OverrideTaskStepProperties
from ._models_py3 import PackageType
from ._models_py3 import ParentProperties
from ._models_py3 import PipelineRun
from ._models_py3 import PipelineRunRequest
Expand Down Expand Up @@ -208,9 +210,11 @@
from ._models import NetworkRuleSet
from ._models import OperationDefinition
from ._models import OperationDisplayDefinition
from ._models import OperationLogSpecificationDefinition
from ._models import OperationMetricSpecificationDefinition
from ._models import OperationServiceSpecificationDefinition
from ._models import OverrideTaskStepProperties
from ._models import PackageType
from ._models import ParentProperties
from ._models import PipelineRun
from ._models import PipelineRunRequest
Expand Down Expand Up @@ -421,9 +425,11 @@
'NetworkRuleSet',
'OperationDefinition',
'OperationDisplayDefinition',
'OperationLogSpecificationDefinition',
'OperationMetricSpecificationDefinition',
'OperationServiceSpecificationDefinition',
'OverrideTaskStepProperties',
'PackageType',
'ParentProperties',
'PipelineRun',
'PipelineRunRequest',
Expand Down
Loading

0 comments on commit be6e3ef

Please sign in to comment.